mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-09 23:53:04 +00:00
set light or dark bar colors for login screens instead primary color
especially for branded clients the primary color might not look good. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
073587b6fd
commit
831ee0cdc4
@ -91,7 +91,7 @@ class AccountVerificationActivity : BaseActivity() {
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
setContentView(binding.root)
|
||||
actionBar?.hide()
|
||||
setupPrimaryColors()
|
||||
setupSystemColors()
|
||||
|
||||
handleIntent()
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ class ServerSelectionActivity : BaseActivity() {
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
setContentView(binding.root)
|
||||
actionBar?.hide()
|
||||
setupPrimaryColors()
|
||||
setupSystemColors()
|
||||
|
||||
onBackPressedDispatcher.addCallback(this, onBackPressedCallback)
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ class SwitchAccountActivity : BaseActivity() {
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
setContentView(binding.root)
|
||||
setupActionBar()
|
||||
setupPrimaryColors()
|
||||
setupSystemColors()
|
||||
|
||||
Configuration.getInstance().load(context, PreferenceManager.getDefaultSharedPreferences(context))
|
||||
|
||||
|
@ -114,7 +114,7 @@ class WebViewLoginActivity : BaseActivity() {
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
setContentView(binding.root)
|
||||
actionBar?.hide()
|
||||
setupPrimaryColors()
|
||||
setupSystemColors()
|
||||
|
||||
onBackPressedDispatcher.addCallback(this, onBackPressedCallback)
|
||||
handleIntent()
|
||||
|
@ -108,19 +108,6 @@ open class BaseActivity : AppCompatActivity() {
|
||||
colorizeNavigationBar()
|
||||
}
|
||||
|
||||
fun setupPrimaryColors() {
|
||||
if (resources != null) {
|
||||
DisplayUtils.applyColorToStatusBar(
|
||||
this,
|
||||
ResourcesCompat.getColor(resources!!, R.color.colorPrimary, null)
|
||||
)
|
||||
DisplayUtils.applyColorToNavigationBar(
|
||||
window,
|
||||
ResourcesCompat.getColor(resources!!, R.color.colorPrimary, null)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
open fun colorizeStatusBar() {
|
||||
if (resources != null) {
|
||||
if (appBarLayoutType == AppBarLayoutType.SEARCH_BAR) {
|
||||
|
Loading…
Reference in New Issue
Block a user