Fix issues with the color selection.
This commit is contained in:
parent
7cdb057560
commit
357fda2090
@ -31,9 +31,7 @@ class SourcesActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
val scoop = Scoop.getInstance()
|
val scoop = Scoop.getInstance()
|
||||||
scoop.bind(this, Toppings.PRIMARY.value, binding.toolbar)
|
scoop.bind(this, Toppings.PRIMARY.value, binding.toolbar)
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
|
||||||
scoop.bindStatusBar(this, Toppings.PRIMARY_DARK.value)
|
scoop.bindStatusBar(this, Toppings.PRIMARY_DARK.value)
|
||||||
}
|
|
||||||
|
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivitySourcesBinding.inflate(layoutInflater)
|
binding = ActivitySourcesBinding.inflate(layoutInflater)
|
||||||
@ -41,10 +39,6 @@ class SourcesActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
setContentView(view)
|
setContentView(view)
|
||||||
|
|
||||||
val scoop = Scoop.getInstance()
|
|
||||||
scoop.bind(this, Toppings.PRIMARY.value, binding.toolbar)
|
|
||||||
scoop.bindStatusBar(this, Toppings.PRIMARY_DARK.value)
|
|
||||||
|
|
||||||
setSupportActionBar(binding.toolbar)
|
setSupportActionBar(binding.toolbar)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
|
@ -13,7 +13,10 @@ import androidx.core.widget.addTextChangedListener
|
|||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import apps.amine.bou.readerforselfoss.R
|
import apps.amine.bou.readerforselfoss.R
|
||||||
|
import apps.amine.bou.readerforselfoss.databinding.ActivitySettingsBinding
|
||||||
|
import apps.amine.bou.readerforselfoss.themes.Toppings
|
||||||
import apps.amine.bou.readerforselfoss.utils.Config
|
import apps.amine.bou.readerforselfoss.utils.Config
|
||||||
|
import com.ftinc.scoop.Scoop
|
||||||
import java.lang.NumberFormatException
|
import java.lang.NumberFormatException
|
||||||
|
|
||||||
private const val TITLE_TAG = "settingsActivityTitle"
|
private const val TITLE_TAG = "settingsActivityTitle"
|
||||||
@ -26,7 +29,13 @@ class SettingsActivity : AppCompatActivity(),
|
|||||||
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("dark_theme", false)) {
|
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("dark_theme", false)) {
|
||||||
setTheme(R.style.NoBarDark)
|
setTheme(R.style.NoBarDark)
|
||||||
}
|
}
|
||||||
setContentView(R.layout.activity_settings)
|
val binding = ActivitySettingsBinding.inflate(layoutInflater)
|
||||||
|
|
||||||
|
val scoop = Scoop.getInstance()
|
||||||
|
scoop.bind(this, Toppings.PRIMARY.value, binding.toolbar)
|
||||||
|
scoop.bindStatusBar(this, Toppings.PRIMARY_DARK.value)
|
||||||
|
|
||||||
|
setContentView(binding.root)
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
supportFragmentManager
|
supportFragmentManager
|
||||||
.beginTransaction()
|
.beginTransaction()
|
||||||
@ -41,7 +50,7 @@ class SettingsActivity : AppCompatActivity(),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setSupportActionBar(findViewById(R.id.toolbar))
|
setSupportActionBar(binding.toolbar)
|
||||||
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user