Changed the colorSend and colorReceive colors and added their respective darker versions. Changed the toolbar and status bar color in both the Send and Receive Transaction Fragment to colorSend and colorReceive with their darker variants accordingly.

master
Severiano Jaramillo 2019-01-03 16:36:20 -06:00
parent f32bfc567b
commit 39ad3cca01
4 changed files with 30 additions and 3 deletions

View File

@ -3,9 +3,9 @@ package cy.agorise.bitsybitshareswallet.fragments
import androidx.lifecycle.ViewModelProviders
import android.os.Bundle
import android.preference.PreferenceManager
import android.util.Log
import android.view.*
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
@ -29,8 +29,14 @@ class HomeFragment : Fragment() {
): View? {
setHasOptionsMenu(true)
// Sets the toolbar background color to primaryColor and forces shows the Bitsy icon to the left
val toolbar: Toolbar? = activity?.findViewById(R.id.toolbar)
toolbar?.navigationIcon = resources.getDrawable(R.drawable.ic_bitsy_logo_2, null)
toolbar?.setBackgroundResource(R.color.colorPrimary)
// Sets the status bar background color to a primaryColorDark
val window = activity?.window
window?.statusBarColor = ContextCompat.getColor(context!!, R.color.colorPrimaryDark)
return inflater.inflate(R.layout.fragment_home, container, false)
}

View File

@ -15,6 +15,7 @@ import android.util.Log
import android.view.*
import android.widget.AdapterView
import android.widget.Toast
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
@ -94,6 +95,14 @@ class ReceiveTransactionFragment : Fragment(), ServiceConnection {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
setHasOptionsMenu(true)
// Sets the toolbar background color to green
val toolbar: Toolbar? = activity?.findViewById(R.id.toolbar)
toolbar?.setBackgroundResource(R.color.colorReceive)
// Sets the status bar background color to a dark green
val window = activity?.window
window?.statusBarColor = ContextCompat.getColor(context!!, R.color.colorReceiveDark)
return inflater.inflate(R.layout.fragment_receive_transaction, container, false)
}

View File

@ -13,6 +13,7 @@ import android.util.Log
import android.view.*
import android.widget.AdapterView
import android.widget.Toast
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
@ -110,6 +111,14 @@ class SendTransactionFragment : Fragment(), ZXingScannerView.ResultHandler, Serv
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
setHasOptionsMenu(true)
// Sets the toolbar background color to red
val toolbar: Toolbar? = activity?.findViewById(R.id.toolbar)
toolbar?.setBackgroundResource(R.color.colorSend)
// Sets the status bar background color to a dark red
val window = activity?.window
window?.statusBarColor = ContextCompat.getColor(context!!, R.color.colorSendDark)
return inflater.inflate(R.layout.fragment_send_transaction, container, false)
}

View File

@ -13,7 +13,10 @@
<color name="lightGray">#aaa</color>
<color name="superLightGray">#d0d0d0</color>
<color name="darkGray">#616161</color>
<color name="colorReceive">#669900</color>
<color name="colorSend">#DC473A</color>
<color name="colorReceive">#388E3C</color>
<color name="colorReceiveDark">#1B5E20</color>
<color name="colorSend">#D32F2F</color>
<color name="colorSendDark">#B71C1C</color>
<color name="errorRed">#F44336</color>
<color name="semiTransparent">#2888</color>
</resources>