From d4553ea6d38575adcd575c2486dbd05bf3c7427d Mon Sep 17 00:00:00 2001 From: revanthkumarJ Date: Sun, 22 Dec 2024 14:24:23 +0530 Subject: [PATCH 1/5] ThemeChanging Functionality Added --- .../kotlin/org/mifos/mobile/HomeActivity.kt | 24 +++++++++---- .../org/mifos/mobile/MifosSelfServiceApp.kt | 3 -- .../core/datastore/PreferencesHelper.kt | 17 ++++++++++ .../mobile/core/designsystem/theme/Color.kt | 2 +- .../feature/settings/SettingsViewModel.kt | 34 ------------------- 5 files changed, 36 insertions(+), 44 deletions(-) diff --git a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt index 5fa0cdc27..ea9e5afc6 100644 --- a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt +++ b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt @@ -17,6 +17,7 @@ import androidx.activity.viewModels import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue @@ -32,9 +33,11 @@ import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.launch import org.mifos.mobile.HomeActivityUiState.Success import org.mifos.mobile.core.data.utils.NetworkMonitor +import org.mifos.mobile.core.datastore.PreferencesHelper import org.mifos.mobile.core.designsystem.theme.MifosMobileTheme import org.mifos.mobile.core.designsystem.theme.darkScrim import org.mifos.mobile.core.designsystem.theme.lightScrim +import org.mifos.mobile.core.model.enums.AppTheme import org.mifos.mobile.navigation.MifosNavGraph.AUTH_GRAPH import org.mifos.mobile.navigation.MifosNavGraph.PASSCODE_GRAPH import org.mifos.mobile.navigation.RootNavGraph @@ -47,6 +50,9 @@ class HomeActivity : ComponentActivity() { @Inject lateinit var networkMonitor: NetworkMonitor + @Inject + lateinit var preferenceHelper: PreferencesHelper + private val viewModel: HomeActivityViewModel by viewModels() override fun onCreate(savedInstanceState: Bundle?) { @@ -76,25 +82,31 @@ class HomeActivity : ComponentActivity() { val navController = rememberNavController() val appState = rememberMifosMobileState(networkMonitor = networkMonitor) - val darkTheme= isSystemInDarkTheme() + val navDestination = when (uiState) { is Success -> if ((uiState as Success).userData.isAuthenticated) { PASSCODE_GRAPH } else { AUTH_GRAPH } - else -> AUTH_GRAPH } - DisposableEffect(darkTheme) { - window?.statusBarColor = if (darkTheme) darkScrim.toArgb() else lightScrim.toArgb() - window?.navigationBarColor = if (darkTheme) darkScrim.toArgb() else lightScrim.toArgb() + val isSystemInDarkMode = isSystemInDarkTheme() + DisposableEffect(isSystemInDarkMode) { + window?.statusBarColor = if (isSystemInDarkMode) darkScrim.toArgb() else lightScrim.toArgb() + window?.navigationBarColor = if (isSystemInDarkMode) darkScrim.toArgb() else lightScrim.toArgb() onDispose {} } + val currentTheme by preferenceHelper.themeFlow.collectAsState() + val isDarkMode = when (currentTheme) { + AppTheme.DARK -> true + AppTheme.LIGHT -> false + AppTheme.SYSTEM -> isSystemInDarkMode + } CompositionLocalProvider { - MifosMobileTheme { + MifosMobileTheme(isDarkMode) { RootNavGraph( appState = appState, navHostController = navController, diff --git a/androidApp/src/main/kotlin/org/mifos/mobile/MifosSelfServiceApp.kt b/androidApp/src/main/kotlin/org/mifos/mobile/MifosSelfServiceApp.kt index a728b6070..2ccac90b8 100644 --- a/androidApp/src/main/kotlin/org/mifos/mobile/MifosSelfServiceApp.kt +++ b/androidApp/src/main/kotlin/org/mifos/mobile/MifosSelfServiceApp.kt @@ -14,8 +14,6 @@ import androidx.multidex.MultiDexApplication import com.google.firebase.crashlytics.FirebaseCrashlytics import com.raizlabs.android.dbflow.config.FlowManager import dagger.hilt.android.HiltAndroidApp -import org.mifos.mobile.core.datastore.PreferencesHelper -import org.mifos.mobile.feature.settings.applySavedTheme @HiltAndroidApp class MifosSelfServiceApp : MultiDexApplication() { @@ -24,7 +22,6 @@ class MifosSelfServiceApp : MultiDexApplication() { MultiDex.install(this) FlowManager.init(this) FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true) - PreferencesHelper(this).applySavedTheme() } override fun onTerminate() { diff --git a/core/datastore/src/main/java/org/mifos/mobile/core/datastore/PreferencesHelper.kt b/core/datastore/src/main/java/org/mifos/mobile/core/datastore/PreferencesHelper.kt index b469a6bea..44b846078 100644 --- a/core/datastore/src/main/java/org/mifos/mobile/core/datastore/PreferencesHelper.kt +++ b/core/datastore/src/main/java/org/mifos/mobile/core/datastore/PreferencesHelper.kt @@ -16,6 +16,8 @@ import android.text.TextUtils import dagger.hilt.android.qualifiers.ApplicationContext import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.channels.awaitClose +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.buffer import kotlinx.coroutines.flow.callbackFlow import org.mifos.mobile.core.model.enums.AppTheme @@ -29,9 +31,23 @@ import javax.inject.Singleton */ @Singleton class PreferencesHelper @Inject constructor(@ApplicationContext context: Context?) { + val themeFlowState: MutableStateFlow + val themeFlow: StateFlow get() = themeFlowState + private val sharedPreferences: SharedPreferences? = PreferenceManager.getDefaultSharedPreferences(context) + init { + if (!sharedPreferences?.contains(APPLICATION_THEME)!!) { + putInt(APPLICATION_THEME, AppTheme.SYSTEM.ordinal) + } + themeFlowState = MutableStateFlow( + AppTheme.entries.getOrNull( + sharedPreferences.getInt(APPLICATION_THEME, AppTheme.SYSTEM.ordinal), + ) ?: AppTheme.SYSTEM, + ) + } + fun clear() { val editor = sharedPreferences?.edit() // prevent deletion of url and tenant @@ -178,6 +194,7 @@ class PreferencesHelper @Inject constructor(@ApplicationContext context: Context get() = getInt(APPLICATION_THEME, AppTheme.SYSTEM.ordinal) ?: AppTheme.SYSTEM.ordinal set(value) { putInt(APPLICATION_THEME, value) + themeFlowState.value = AppTheme.entries[value] } var language diff --git a/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Color.kt b/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Color.kt index b08093456..dae68a6ce 100644 --- a/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Color.kt +++ b/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Color.kt @@ -37,4 +37,4 @@ val LightSurfaceTint = Color(0xFF325CA8) val DarkSurfaceTint = Color(0xFFAEC6FF) val lightScrim = Color(0x80FFFFFF) -val darkScrim = Color(0x80000000) \ No newline at end of file +val darkScrim = Color(0x80000000) diff --git a/feature/settings/src/main/java/org/mifos/mobile/feature/settings/SettingsViewModel.kt b/feature/settings/src/main/java/org/mifos/mobile/feature/settings/SettingsViewModel.kt index 2e0627206..6d974423e 100644 --- a/feature/settings/src/main/java/org/mifos/mobile/feature/settings/SettingsViewModel.kt +++ b/feature/settings/src/main/java/org/mifos/mobile/feature/settings/SettingsViewModel.kt @@ -9,8 +9,6 @@ */ package org.mifos.mobile.feature.settings -import android.os.Build -import androidx.appcompat.app.AppCompatDelegate import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import dagger.hilt.android.lifecycle.HiltViewModel @@ -70,15 +68,7 @@ internal class SettingsViewModel @Inject constructor( } fun updateTheme(theme: AppTheme) { - AppCompatDelegate.setDefaultNightMode( - when (theme) { - AppTheme.DARK -> AppCompatDelegate.MODE_NIGHT_YES - AppTheme.LIGHT -> AppCompatDelegate.MODE_NIGHT_NO - else -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM - }, - ) preferencesHelper.appTheme = theme.ordinal - preferencesHelper.applyTheme(theme) } } @@ -124,27 +114,3 @@ internal enum class SettingsCardItem( subclassOf = R.string.other, ), } - -fun PreferencesHelper.applySavedTheme() { - val applicationTheme = AppTheme.entries.find { it.ordinal == this.appTheme } - AppCompatDelegate.setDefaultNightMode( - when { - applicationTheme == AppTheme.DARK -> AppCompatDelegate.MODE_NIGHT_YES - applicationTheme == AppTheme.LIGHT -> AppCompatDelegate.MODE_NIGHT_NO - Build.VERSION.SDK_INT > Build.VERSION_CODES.P -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM - else -> AppCompatDelegate.MODE_NIGHT_NO - }, - ) -} - -internal fun PreferencesHelper.applyTheme(applicationTheme: AppTheme) { - this.appTheme = applicationTheme.ordinal - AppCompatDelegate.setDefaultNightMode( - when { - applicationTheme == AppTheme.DARK -> AppCompatDelegate.MODE_NIGHT_YES - applicationTheme == AppTheme.LIGHT -> AppCompatDelegate.MODE_NIGHT_NO - Build.VERSION.SDK_INT > Build.VERSION_CODES.P -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM - else -> AppCompatDelegate.MODE_NIGHT_NO - }, - ) -} From 30e68fc81b74f576caefc9633d52518b9c39ef9c Mon Sep 17 00:00:00 2001 From: revanthkumarJ Date: Mon, 23 Dec 2024 10:01:10 +0530 Subject: [PATCH 2/5] Moved Preference Helper Initialization to Viewmodel --- .../kotlin/org/mifos/mobile/HomeActivity.kt | 22 +++++++++---------- .../org/mifos/mobile/HomeActivityViewModel.kt | 13 ++++++++--- .../core/datastore/PreferencesHelper.kt | 5 +++-- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt index ea9e5afc6..d6c99cf30 100644 --- a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt +++ b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt @@ -17,7 +17,6 @@ import androidx.activity.viewModels import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.DisposableEffect -import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue @@ -33,7 +32,6 @@ import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.launch import org.mifos.mobile.HomeActivityUiState.Success import org.mifos.mobile.core.data.utils.NetworkMonitor -import org.mifos.mobile.core.datastore.PreferencesHelper import org.mifos.mobile.core.designsystem.theme.MifosMobileTheme import org.mifos.mobile.core.designsystem.theme.darkScrim import org.mifos.mobile.core.designsystem.theme.lightScrim @@ -50,9 +48,6 @@ class HomeActivity : ComponentActivity() { @Inject lateinit var networkMonitor: NetworkMonitor - @Inject - lateinit var preferenceHelper: PreferencesHelper - private val viewModel: HomeActivityViewModel by viewModels() override fun onCreate(savedInstanceState: Bundle?) { @@ -60,7 +55,6 @@ class HomeActivity : ComponentActivity() { super.onCreate(savedInstanceState) var uiState: HomeActivityUiState by mutableStateOf(HomeActivityUiState.Loading) - // Update the uiState lifecycleScope.launch { lifecycle.repeatOnLifecycle(Lifecycle.State.STARTED) { viewModel.uiState @@ -76,6 +70,7 @@ class HomeActivity : ComponentActivity() { } } + enableEdgeToEdge() setContent { @@ -99,12 +94,15 @@ class HomeActivity : ComponentActivity() { onDispose {} } - val currentTheme by preferenceHelper.themeFlow.collectAsState() - val isDarkMode = when (currentTheme) { - AppTheme.DARK -> true - AppTheme.LIGHT -> false - AppTheme.SYSTEM -> isSystemInDarkMode + val isDarkMode = when (uiState) { + is Success -> when ((uiState as Success).themeState) { + AppTheme.DARK -> true + AppTheme.LIGHT -> false + AppTheme.SYSTEM -> isSystemInDarkMode + } + else -> isSystemInDarkMode } + CompositionLocalProvider { MifosMobileTheme(isDarkMode) { RootNavGraph( @@ -124,4 +122,4 @@ class HomeActivity : ComponentActivity() { } } } -} +} \ No newline at end of file diff --git a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivityViewModel.kt b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivityViewModel.kt index fdfc7e533..bd88118ae 100644 --- a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivityViewModel.kt +++ b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivityViewModel.kt @@ -14,22 +14,29 @@ import androidx.lifecycle.viewModelScope import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch import org.mifos.library.passcode.data.PasscodeManager import org.mifos.mobile.core.data.repository.UserDataRepository +import org.mifos.mobile.core.datastore.PreferencesHelper import org.mifos.mobile.core.model.UserData +import org.mifos.mobile.core.model.enums.AppTheme import javax.inject.Inject @HiltViewModel class HomeActivityViewModel @Inject constructor( private val userDataRepository: UserDataRepository, private val passcodeManager: PasscodeManager, + private val preferencesHelper: PreferencesHelper ) : ViewModel() { - val uiState: StateFlow = userDataRepository.userData.map { - HomeActivityUiState.Success(it) + val uiState: StateFlow = combine( + userDataRepository.userData, + preferencesHelper.themeFlow + ) { userData, themeState -> + HomeActivityUiState.Success(userData, themeState) }.stateIn( scope = viewModelScope, initialValue = HomeActivityUiState.Loading, @@ -46,5 +53,5 @@ class HomeActivityViewModel @Inject constructor( sealed interface HomeActivityUiState { data object Loading : HomeActivityUiState - data class Success(val userData: UserData) : HomeActivityUiState + data class Success(val userData: UserData,val themeState: AppTheme) : HomeActivityUiState } diff --git a/core/datastore/src/main/java/org/mifos/mobile/core/datastore/PreferencesHelper.kt b/core/datastore/src/main/java/org/mifos/mobile/core/datastore/PreferencesHelper.kt index 44b846078..8c1fea1d8 100644 --- a/core/datastore/src/main/java/org/mifos/mobile/core/datastore/PreferencesHelper.kt +++ b/core/datastore/src/main/java/org/mifos/mobile/core/datastore/PreferencesHelper.kt @@ -18,6 +18,7 @@ import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.buffer import kotlinx.coroutines.flow.callbackFlow import org.mifos.mobile.core.model.enums.AppTheme @@ -31,8 +32,8 @@ import javax.inject.Singleton */ @Singleton class PreferencesHelper @Inject constructor(@ApplicationContext context: Context?) { - val themeFlowState: MutableStateFlow - val themeFlow: StateFlow get() = themeFlowState + private val themeFlowState: MutableStateFlow + val themeFlow: StateFlow get() = themeFlowState.asStateFlow() private val sharedPreferences: SharedPreferences? = PreferenceManager.getDefaultSharedPreferences(context) From 84c6b4b1b41ebf4e16206411a8d1e63553be72cc Mon Sep 17 00:00:00 2001 From: revanthkumarJ Date: Mon, 23 Dec 2024 10:13:32 +0530 Subject: [PATCH 3/5] Moved Preference Helper Initialization to Viewmodel --- .../src/main/kotlin/org/mifos/mobile/HomeActivity.kt | 3 +-- .../main/kotlin/org/mifos/mobile/HomeActivityViewModel.kt | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt index d6c99cf30..822707719 100644 --- a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt +++ b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt @@ -70,7 +70,6 @@ class HomeActivity : ComponentActivity() { } } - enableEdgeToEdge() setContent { @@ -122,4 +121,4 @@ class HomeActivity : ComponentActivity() { } } } -} \ No newline at end of file +} diff --git a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivityViewModel.kt b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivityViewModel.kt index bd88118ae..776d00a5b 100644 --- a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivityViewModel.kt +++ b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivityViewModel.kt @@ -15,7 +15,6 @@ import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.combine -import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch import org.mifos.library.passcode.data.PasscodeManager @@ -29,12 +28,12 @@ import javax.inject.Inject class HomeActivityViewModel @Inject constructor( private val userDataRepository: UserDataRepository, private val passcodeManager: PasscodeManager, - private val preferencesHelper: PreferencesHelper + private val preferencesHelper: PreferencesHelper, ) : ViewModel() { val uiState: StateFlow = combine( userDataRepository.userData, - preferencesHelper.themeFlow + preferencesHelper.themeFlow, ) { userData, themeState -> HomeActivityUiState.Success(userData, themeState) }.stateIn( @@ -53,5 +52,5 @@ class HomeActivityViewModel @Inject constructor( sealed interface HomeActivityUiState { data object Loading : HomeActivityUiState - data class Success(val userData: UserData,val themeState: AppTheme) : HomeActivityUiState + data class Success(val userData: UserData, val themeState: AppTheme) : HomeActivityUiState } From 115842c0283c15284aff860d3f4ed1fe8910591d Mon Sep 17 00:00:00 2001 From: revanthkumarJ Date: Thu, 26 Dec 2024 21:17:06 +0530 Subject: [PATCH 4/5] Used EdgeToEdge api --- .../kotlin/org/mifos/mobile/HomeActivity.kt | 14 ++++++++-- .../src/main/res/values-night/color.xml | 13 +++++++++ .../src/main/res/values-night/theme.xml | 21 ++++++++++++++ androidApp/src/main/res/values/colors.xml | 2 +- androidApp/src/main/res/values/splash.xml | 28 +++++++++++-------- .../mobile/core/designsystem/theme/Theme.kt | 2 +- 6 files changed, 64 insertions(+), 16 deletions(-) create mode 100644 androidApp/src/main/res/values-night/color.xml create mode 100644 androidApp/src/main/res/values-night/theme.xml diff --git a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt index 822707719..dbd27a82c 100644 --- a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt +++ b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt @@ -9,8 +9,10 @@ */ package org.mifos.mobile +import android.graphics.Color import android.os.Bundle import androidx.activity.ComponentActivity +import androidx.activity.SystemBarStyle import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge import androidx.activity.viewModels @@ -88,8 +90,16 @@ class HomeActivity : ComponentActivity() { val isSystemInDarkMode = isSystemInDarkTheme() DisposableEffect(isSystemInDarkMode) { - window?.statusBarColor = if (isSystemInDarkMode) darkScrim.toArgb() else lightScrim.toArgb() - window?.navigationBarColor = if (isSystemInDarkMode) darkScrim.toArgb() else lightScrim.toArgb() + enableEdgeToEdge( + statusBarStyle = SystemBarStyle.auto( + Color.TRANSPARENT, + Color.TRANSPARENT, + ) { isSystemInDarkMode }, + navigationBarStyle = SystemBarStyle.auto( + lightScrim.toArgb(), + darkScrim.toArgb(), + ) { isSystemInDarkMode }, + ) onDispose {} } diff --git a/androidApp/src/main/res/values-night/color.xml b/androidApp/src/main/res/values-night/color.xml new file mode 100644 index 000000000..b71f9f07c --- /dev/null +++ b/androidApp/src/main/res/values-night/color.xml @@ -0,0 +1,13 @@ + + + + #FF1B1B1F // dark/color.xml + \ No newline at end of file diff --git a/androidApp/src/main/res/values-night/theme.xml b/androidApp/src/main/res/values-night/theme.xml new file mode 100644 index 000000000..1bcacceb8 --- /dev/null +++ b/androidApp/src/main/res/values-night/theme.xml @@ -0,0 +1,21 @@ + + + + + + + + + \ No newline at end of file diff --git a/androidApp/src/main/res/values/colors.xml b/androidApp/src/main/res/values/colors.xml index 94394e4c5..f6d79d8f5 100644 --- a/androidApp/src/main/res/values/colors.xml +++ b/androidApp/src/main/res/values/colors.xml @@ -54,7 +54,7 @@ #33CCCCCC - + #FFFEFBFF diff --git a/androidApp/src/main/res/values/splash.xml b/androidApp/src/main/res/values/splash.xml index 9ee17867e..7f2f74168 100644 --- a/androidApp/src/main/res/values/splash.xml +++ b/androidApp/src/main/res/values/splash.xml @@ -8,18 +8,22 @@ See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md --> - - - + + - + \ No newline at end of file diff --git a/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Theme.kt b/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Theme.kt index b3e2da1f8..d5c34ea67 100644 --- a/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Theme.kt +++ b/core/designsystem/src/main/kotlin/org/mifos/mobile/core/designsystem/theme/Theme.kt @@ -33,7 +33,7 @@ private val DarkThemeColors = darkColorScheme( secondary = Black1, error = RedErrorDark, background = BackgroundDark, - surface = Black1, + surface = BackgroundDark, onSurface = Color.White, onSecondary = Color.White, outlineVariant = Color.White, From 3683ae1f0aa817c19a6e6021e0d0f106ceeecca0 Mon Sep 17 00:00:00 2001 From: revanthkumarJ Date: Thu, 26 Dec 2024 22:52:35 +0530 Subject: [PATCH 5/5] Updated Splash screen --- androidApp/src/main/AndroidManifest.xml | 2 +- androidApp/src/main/res/values/splash.xml | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/androidApp/src/main/AndroidManifest.xml b/androidApp/src/main/AndroidManifest.xml index cd18e8e82..f33d075aa 100644 --- a/androidApp/src/main/AndroidManifest.xml +++ b/androidApp/src/main/AndroidManifest.xml @@ -38,7 +38,7 @@ diff --git a/androidApp/src/main/res/values/splash.xml b/androidApp/src/main/res/values/splash.xml index 7f2f74168..64f0c3289 100644 --- a/androidApp/src/main/res/values/splash.xml +++ b/androidApp/src/main/res/values/splash.xml @@ -9,21 +9,30 @@ See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md --> - + + - - + + - \ No newline at end of file +