Merge pull request #351 from Philoul/Selected_Item_Background

Selected item background + Fix Local Profile default selected tab missing
This commit is contained in:
Milos Kozak 2021-02-20 10:42:21 +01:00 committed by GitHub
commit b5ed2f6cbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -290,7 +290,7 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() {
} }
private fun setBackgroundColorOnSelected(tab: Int) { private fun setBackgroundColorOnSelected(tab: Int) {
binding.menu1.setBackgroundColor(resourceHelper.gc(if (tab == 1) R.color.defaultbackground else R.color.tabBgColorSelected)) binding.menu1.setBackgroundColor(resourceHelper.gc(if (tab == 1) R.color.defaultbackground else R.color.tempbasal))
binding.menu2.setBackgroundColor(resourceHelper.gc(if (tab == 0) R.color.defaultbackground else R.color.examinedProfile)) binding.menu2.setBackgroundColor(resourceHelper.gc(if (tab == 0) R.color.defaultbackground else R.color.examinedProfile))
} }
} }

View file

@ -82,6 +82,7 @@ class LocalProfileFragment : DaggerFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
// activate DIA tab // activate DIA tab
processVisibilityOnClick(binding.diaTab)
binding.diaPlaceholder.visibility = View.VISIBLE binding.diaPlaceholder.visibility = View.VISIBLE
// setup listeners // setup listeners
binding.diaTab.setOnClickListener { binding.diaTab.setOnClickListener {

View file

@ -10,7 +10,7 @@
<color name="devslopepos">#FFFFFF00</color> <color name="devslopepos">#FFFFFF00</color>
<color name="devslopeneg">#FFFF00FF</color> <color name="devslopeneg">#FFFF00FF</color>
<color name="actionsConfirm">#FFFF00</color> <color name="actionsConfirm">#FFFF00</color>
<color name="tabBgColorSelected">#FF33B5E5</color> <color name="tabBgColorSelected">#FF666666</color>
<color name="deviations">#FF0000</color> <color name="deviations">#FF0000</color>
<color name="cobAlert">#7484E2</color> <color name="cobAlert">#7484E2</color>
<color name="inrangebackground">#2800FF00</color> <color name="inrangebackground">#2800FF00</color>