mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-09 13:59:48 +01: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
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
actionBar?.hide()
|
actionBar?.hide()
|
||||||
setupPrimaryColors()
|
setupSystemColors()
|
||||||
|
|
||||||
handleIntent()
|
handleIntent()
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ class ServerSelectionActivity : BaseActivity() {
|
|||||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
actionBar?.hide()
|
actionBar?.hide()
|
||||||
setupPrimaryColors()
|
setupSystemColors()
|
||||||
|
|
||||||
onBackPressedDispatcher.addCallback(this, onBackPressedCallback)
|
onBackPressedDispatcher.addCallback(this, onBackPressedCallback)
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ class SwitchAccountActivity : BaseActivity() {
|
|||||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
setupActionBar()
|
setupActionBar()
|
||||||
setupPrimaryColors()
|
setupSystemColors()
|
||||||
|
|
||||||
Configuration.getInstance().load(context, PreferenceManager.getDefaultSharedPreferences(context))
|
Configuration.getInstance().load(context, PreferenceManager.getDefaultSharedPreferences(context))
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ class WebViewLoginActivity : BaseActivity() {
|
|||||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
actionBar?.hide()
|
actionBar?.hide()
|
||||||
setupPrimaryColors()
|
setupSystemColors()
|
||||||
|
|
||||||
onBackPressedDispatcher.addCallback(this, onBackPressedCallback)
|
onBackPressedDispatcher.addCallback(this, onBackPressedCallback)
|
||||||
handleIntent()
|
handleIntent()
|
||||||
|
@ -108,19 +108,6 @@ open class BaseActivity : AppCompatActivity() {
|
|||||||
colorizeNavigationBar()
|
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() {
|
open fun colorizeStatusBar() {
|
||||||
if (resources != null) {
|
if (resources != null) {
|
||||||
if (appBarLayoutType == AppBarLayoutType.SEARCH_BAR) {
|
if (appBarLayoutType == AppBarLayoutType.SEARCH_BAR) {
|
||||||
|
Loading…
Reference in New Issue
Block a user