Merge pull request #3900 from nextcloud/improveBarColorsForLogin

set light or dark bar colors for login screens instead primary color
This commit is contained in:
Sowjanya Kota 2024-05-08 15:01:45 +02:00 committed by GitHub
commit 500f2ca1a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 4 additions and 17 deletions

View File

@ -91,7 +91,7 @@ class AccountVerificationActivity : BaseActivity() {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
setContentView(binding.root)
actionBar?.hide()
setupPrimaryColors()
setupSystemColors()
handleIntent()
}

View File

@ -78,7 +78,7 @@ class ServerSelectionActivity : BaseActivity() {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
setContentView(binding.root)
actionBar?.hide()
setupPrimaryColors()
setupSystemColors()
onBackPressedDispatcher.addCallback(this, onBackPressedCallback)
}

View File

@ -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))

View File

@ -114,7 +114,7 @@ class WebViewLoginActivity : BaseActivity() {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
setContentView(binding.root)
actionBar?.hide()
setupPrimaryColors()
setupSystemColors()
onBackPressedDispatcher.addCallback(this, onBackPressedCallback)
handleIntent()

View File

@ -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) {