taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

commit 903e70870b335dd08aea668b50502181d2f45fef
parent 9f21c1651eeb81b58e55c4fec64716f2e05df2a1
Author: Iván Ávalos <avalos@disroot.org>
Date:   Fri, 24 Apr 2026 23:10:50 +0200

[wallet] fully port theme/colors to Jetpack Compose

Diffstat:
Mwallet/src/main/java/net/taler/wallet/compose/Utils.kt | 7++-----
Mwallet/src/main/java/net/taler/wallet/deposit/PayToUriScreen.kt | 15+++++++++++++++
Mwallet/src/main/java/net/taler/wallet/main/MainActivity.kt | 4++--
Awallet/src/main/java/net/taler/wallet/ui/theme/Color.kt | 91+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Awallet/src/main/java/net/taler/wallet/ui/theme/Theme.kt | 126+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dwallet/src/main/res/values-night/styles.xml | 28----------------------------
Dwallet/src/main/res/values-v27/styles.xml | 27---------------------------
Mwallet/src/main/res/values/colors.xml | 284-------------------------------------------------------------------------------
Dwallet/src/main/res/values/defaults.xml | 20--------------------
Mwallet/src/main/res/values/styles.xml | 73+++++--------------------------------------------------------------------
10 files changed, 241 insertions(+), 434 deletions(-)

diff --git a/wallet/src/main/java/net/taler/wallet/compose/Utils.kt b/wallet/src/main/java/net/taler/wallet/compose/Utils.kt @@ -30,7 +30,6 @@ import androidx.compose.ui.unit.dp import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.flowWithLifecycle -import com.google.accompanist.themeadapter.material3.Mdc3Theme import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.StateFlow import kotlin.coroutines.CoroutineContext @@ -67,9 +66,7 @@ fun Modifier.cardPaddings(): Modifier = @Composable fun TalerSurface(content: @Composable () -> Unit) { - Mdc3Theme { - Surface(Modifier.nestedScroll(rememberNestedScrollInteropConnection())) { - content() - } + Surface(Modifier.nestedScroll(rememberNestedScrollInteropConnection())) { + content() } } diff --git a/wallet/src/main/java/net/taler/wallet/deposit/PayToUriScreen.kt b/wallet/src/main/java/net/taler/wallet/deposit/PayToUriScreen.kt @@ -25,6 +25,7 @@ import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material3.Button import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -36,6 +37,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.core.net.toUri import net.taler.common.Amount @@ -163,3 +165,16 @@ private fun PayToComposable( BottomInsetsSpacer() } } + +@Preview +@Composable +fun PreviewPayToComposable() { + Surface { + PayToComposable( + currencies = listOf("KUDOS", "TESTKUDOS", "BTCBITCOIN"), + getAmount = { _, _ -> AmountResult.InvalidAmount }, + onAmountChosen = {}, + getCurrencySpec = { null } + ) + } +} diff --git a/wallet/src/main/java/net/taler/wallet/main/MainActivity.kt b/wallet/src/main/java/net/taler/wallet/main/MainActivity.kt @@ -83,11 +83,11 @@ import net.taler.wallet.WalletDestination import net.taler.wallet.WalletNavHost import net.taler.wallet.backend.TalerErrorInfo import net.taler.wallet.compose.ErrorBottomSheet -import net.taler.wallet.compose.TalerSurface import net.taler.wallet.events.ObservabilityDialog import net.taler.wallet.launchInAppBrowser import net.taler.wallet.transactions.TransactionPeerPullCredit import net.taler.wallet.transactions.TransactionPeerPushDebit +import net.taler.wallet.ui.theme.TalerTheme class MainActivity : FragmentActivity() { private val model: MainViewModel by viewModels() @@ -112,7 +112,7 @@ class MainActivity : FragmentActivity() { TalerNfcService.startService(this) setContent { - TalerSurface { + TalerTheme { val navController = rememberNavController() nav = navController var errorInfo by remember { mutableStateOf<TalerErrorInfo?>(null) } diff --git a/wallet/src/main/java/net/taler/wallet/ui/theme/Color.kt b/wallet/src/main/java/net/taler/wallet/ui/theme/Color.kt @@ -0,0 +1,91 @@ +/* + * This file is part of GNU Taler + * (C) 2026 Taler Systems S.A. + * + * GNU Taler is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3, or (at your option) any later version. + * + * GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + * A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + */ + +package net.taler.wallet.ui.theme + +import androidx.compose.ui.graphics.Color + +val primaryLight = Color(0xFF0042B3) +val onPrimaryLight = Color(0xFFFFFFFF) +val primaryContainerLight = Color(0xFFD3DEFF) +val onPrimaryContainerLight = Color(0xFF00134A) +val secondaryLight = Color(0xFF586A88) +val onSecondaryLight = Color(0xFFFFFFFF) +val secondaryContainerLight = Color(0xFFD9E3F9) +val onSecondaryContainerLight = Color(0xFF111C2B) +val tertiaryLight = Color(0xFF338AF0) +val onTertiaryLight = Color(0xFFFFFFFF) +val tertiaryContainerLight = Color(0xFFD1E4FF) +val onTertiaryContainerLight = Color(0xFF001C39) +val errorLight = Color(0xFFB3261E) +val onErrorLight = Color(0xFFFFFFFF) +val errorContainerLight = Color(0xFFF9DEDC) +val onErrorContainerLight = Color(0xFF410E0B) +val backgroundLight = Color(0xFFFDFDFF) +val onBackgroundLight = Color(0xFF1A1C1F) +val surfaceLight = Color(0xFFFDFDFF) +val onSurfaceLight = Color(0xFF1C1B1F) +val surfaceVariantLight = Color(0xFFE0E3EC) +val onSurfaceVariantLight = Color(0xFF45474F) +val outlineLight = Color(0xFF767880) +val outlineVariantLight = Color(0xFFC4C6D0) +val scrimLight = Color(0xFF000000) +val inverseSurfaceLight = Color(0xFF2C2F3A) +val inverseOnSurfaceLight = Color(0xFFF0F2FF) +val inversePrimaryLight = Color(0xFFB4C5FF) +val surfaceDimLight = Color(0xFFDADDE5) +val surfaceBrightLight = Color(0xFFFFFFFF) +val surfaceContainerLowestLight = Color(0xFFFFFFFF) +val surfaceContainerLowLight = Color(0xFFF5F7FC) +val surfaceContainerLight = Color(0xFFF0F2F7) +val surfaceContainerHighLight = Color(0xFFEAECEF) +val surfaceContainerHighestLight = Color(0xFFE3E6EB) + +val primaryDark = Color(0xFFB4C5FF) +val onPrimaryDark = Color(0xFF002A78) +val primaryContainerDark = Color(0xFF0042B3) +val onPrimaryContainerDark = Color(0xFFE5EBFF) +val secondaryDark = Color(0xFFA4C9FF) +val onSecondaryDark = Color(0xFF00315D) +val secondaryContainerDark = Color(0xFF72A3E5) +val onSecondaryContainerDark = Color(0xFF003869) +val tertiaryDark = Color(0xFF8DD1E5) +val onTertiaryDark = Color(0xFF003641) +val tertiaryContainerDark = Color(0xFF166577) +val onTertiaryContainerDark = Color(0xFF9CE0F5) +val errorDark = Color(0xFFFFB4AA) +val onErrorDark = Color(0xFF690003) +val errorContainerDark = Color(0xFFB3261E) +val onErrorContainerDark = Color(0xFFFFCBC4) +val backgroundDark = Color(0xFF11131A) +val onBackgroundDark = Color(0xFFE2E2EB) +val surfaceDark = Color(0xFF11131A) +val onSurfaceDark = Color(0xFFE5E2E1) +val surfaceVariantDark = Color(0xFF45474B) +val onSurfaceVariantDark = Color(0xFFC6C6CB) +val outlineDark = Color(0xFF8F9095) +val outlineVariantDark = Color(0xFF45474B) +val scrimDark = Color(0xFF000000) +val inverseSurfaceDark = Color(0xFFE5E2E1) +val inverseOnSurfaceDark = Color(0xFF313030) +val inversePrimaryDark = Color(0xFF2756C7) +val surfaceDimDark = Color(0xFF11131A) +val surfaceBrightDark = Color(0xFF3A3939) +val surfaceContainerLowestDark = Color(0xFF0E0E0E) +val surfaceContainerLowDark = Color(0xFF1C1B1B) +val surfaceContainerDark = Color(0xFF201F1F) +val surfaceContainerHighDark = Color(0xFF2A2A2A) +val surfaceContainerHighestDark = Color(0xFF353434) diff --git a/wallet/src/main/java/net/taler/wallet/ui/theme/Theme.kt b/wallet/src/main/java/net/taler/wallet/ui/theme/Theme.kt @@ -0,0 +1,126 @@ +/* + * This file is part of GNU Taler + * (C) 2026 Taler Systems S.A. + * + * GNU Taler is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 3, or (at your option) any later version. + * + * GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + * A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with + * GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + */ + +package net.taler.wallet.ui.theme + +import android.os.Build +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.darkColorScheme +import androidx.compose.material3.dynamicDarkColorScheme +import androidx.compose.material3.dynamicLightColorScheme +import androidx.compose.material3.lightColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.platform.LocalContext + +private val lightScheme = lightColorScheme( + primary = primaryLight, + onPrimary = onPrimaryLight, + primaryContainer = primaryContainerLight, + onPrimaryContainer = onPrimaryContainerLight, + secondary = secondaryLight, + onSecondary = onSecondaryLight, + secondaryContainer = secondaryContainerLight, + onSecondaryContainer = onSecondaryContainerLight, + tertiary = tertiaryLight, + onTertiary = onTertiaryLight, + tertiaryContainer = tertiaryContainerLight, + onTertiaryContainer = onTertiaryContainerLight, + error = errorLight, + onError = onErrorLight, + errorContainer = errorContainerLight, + onErrorContainer = onErrorContainerLight, + background = backgroundLight, + onBackground = onBackgroundLight, + surface = surfaceLight, + onSurface = onSurfaceLight, + surfaceVariant = surfaceVariantLight, + onSurfaceVariant = onSurfaceVariantLight, + outline = outlineLight, + outlineVariant = outlineVariantLight, + scrim = scrimLight, + inverseSurface = inverseSurfaceLight, + inverseOnSurface = inverseOnSurfaceLight, + inversePrimary = inversePrimaryLight, + surfaceDim = surfaceDimLight, + surfaceBright = surfaceBrightLight, + surfaceContainerLowest = surfaceContainerLowestLight, + surfaceContainerLow = surfaceContainerLowLight, + surfaceContainer = surfaceContainerLight, + surfaceContainerHigh = surfaceContainerHighLight, + surfaceContainerHighest = surfaceContainerHighestLight, +) + +private val darkScheme = darkColorScheme( + primary = primaryDark, + onPrimary = onPrimaryDark, + primaryContainer = primaryContainerDark, + onPrimaryContainer = onPrimaryContainerDark, + secondary = secondaryDark, + onSecondary = onSecondaryDark, + secondaryContainer = secondaryContainerDark, + onSecondaryContainer = onSecondaryContainerDark, + tertiary = tertiaryDark, + onTertiary = onTertiaryDark, + tertiaryContainer = tertiaryContainerDark, + onTertiaryContainer = onTertiaryContainerDark, + error = errorDark, + onError = onErrorDark, + errorContainer = errorContainerDark, + onErrorContainer = onErrorContainerDark, + background = backgroundDark, + onBackground = onBackgroundDark, + surface = surfaceDark, + onSurface = onSurfaceDark, + surfaceVariant = surfaceVariantDark, + onSurfaceVariant = onSurfaceVariantDark, + outline = outlineDark, + outlineVariant = outlineVariantDark, + scrim = scrimDark, + inverseSurface = inverseSurfaceDark, + inverseOnSurface = inverseOnSurfaceDark, + inversePrimary = inversePrimaryDark, + surfaceDim = surfaceDimDark, + surfaceBright = surfaceBrightDark, + surfaceContainerLowest = surfaceContainerLowestDark, + surfaceContainerLow = surfaceContainerLowDark, + surfaceContainer = surfaceContainerDark, + surfaceContainerHigh = surfaceContainerHighDark, + surfaceContainerHighest = surfaceContainerHighestDark, +) + +@Composable +fun TalerTheme( + darkTheme: Boolean = isSystemInDarkTheme(), + // Dynamic color is available on Android 12+ + dynamicColor: Boolean = false, + content: @Composable () -> Unit +) { + val colorScheme = when { + dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { + val context = LocalContext.current + if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) + } + + darkTheme -> darkScheme + else -> lightScheme + } + + MaterialTheme( + colorScheme = colorScheme, + content = content + ) +} diff --git a/wallet/src/main/res/values-night/styles.xml b/wallet/src/main/res/values-night/styles.xml @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?><!-- - ~ This file is part of GNU Taler - ~ (C) 2023 Taler Systems S.A. - ~ - ~ GNU Taler is free software; you can redistribute it and/or modify it under the - ~ terms of the GNU General Public License as published by the Free Software - ~ Foundation; either version 3, or (at your option) any later version. - ~ - ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. - ~ - ~ You should have received a copy of the GNU General Public License along with - ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - --> - - -<resources xmlns:tools="http://schemas.android.com/tools"> - - <style name="AppTheme" parent="AppTheme.Dark"> - <item name="windowActionModeOverlay">true</item> - <item name="android:statusBarColor">?colorSurface</item> - <item name="android:windowLightStatusBar" tools:targetApi="m">false</item> - <item name="android:navigationBarColor">?colorSurface</item> - <item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item> - </style> - -</resources> diff --git a/wallet/src/main/res/values-v27/styles.xml b/wallet/src/main/res/values-v27/styles.xml @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?><!-- - ~ This file is part of GNU Taler - ~ (C) 2023 Taler Systems S.A. - ~ - ~ GNU Taler is free software; you can redistribute it and/or modify it under the - ~ terms of the GNU General Public License as published by the Free Software - ~ Foundation; either version 3, or (at your option) any later version. - ~ - ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. - ~ - ~ You should have received a copy of the GNU General Public License along with - ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - --> - -<resources> - - <style name="AppTheme" parent="AppTheme.Light"> - <item name="android:statusBarColor">?colorSurface</item> - <item name="android:windowLightStatusBar">true</item> - <item name="android:navigationBarColor">?colorSurface</item> - <item name="android:windowLightNavigationBar">true</item> - </style> - -</resources> -\ No newline at end of file diff --git a/wallet/src/main/res/values/colors.xml b/wallet/src/main/res/values/colors.xml @@ -18,288 +18,4 @@ <color name="colorPrimary">#3047a3</color> <color name="colorPrimaryDark">#152238</color> <color name="colorAccent">#BB1D24</color> - - <!-- Material 3 theme builder --> - <color name="md_theme_light_primary">#0042B3</color> - <color name="md_theme_light_onPrimary">#FFFFFF</color> - <color name="md_theme_light_primaryContainer">#D3DEFF</color> - <color name="md_theme_light_onPrimaryContainer">#00134A</color> - <color name="md_theme_light_secondary">#586A88</color> - <color name="md_theme_light_onSecondary">#FFFFFF</color> - <color name="md_theme_light_secondaryContainer">#d9E3F9</color> - <color name="md_theme_light_onSecondaryContainer">#111C2B</color> - <color name="md_theme_light_tertiary">#338AF0</color> - <color name="md_theme_light_onTertiary">#FFFFFF</color> - <color name="md_theme_light_tertiaryContainer">#D1E4FF</color> - <color name="md_theme_light_onTertiaryContainer">#001C39</color> - <color name="md_theme_light_error">#B3261E</color> - <color name="md_theme_light_onError">#FFFFFF</color> - <color name="md_theme_light_errorContainer">#F9DEDC</color> - <color name="md_theme_light_onErrorContainer">#410E0B</color> - <color name="md_theme_light_background">#FDFDFF</color> - <color name="md_theme_light_onBackground">#1A1C1F</color> - <color name="md_theme_light_surface">#FDFDFF</color> - <color name="md_theme_light_onSurface">#1C1B1F</color> - <color name="md_theme_light_surfaceVariant">#E0E3EC</color> - <color name="md_theme_light_onSurfaceVariant">#45474F</color> - <color name="md_theme_light_outline">#767880</color> - <color name="md_theme_light_outlineVariant">#C4C6D0</color> - <color name="md_theme_light_scrim">#000000</color> - <color name="md_theme_light_inverseSurface">#2C2F3A</color> - <color name="md_theme_light_inverseOnSurface">#F0F2FF</color> - <color name="md_theme_light_inversePrimary">#B4C5FF</color> - <color name="md_theme_light_primaryFixed">#D3DEFF</color> - <color name="md_theme_light_onPrimaryFixed">#00134A</color> - <color name="md_theme_light_primaryFixedDim">#B4C5FF</color> - <color name="md_theme_light_onPrimaryFixedVariant">#00379C</color> - <color name="md_theme_light_secondaryFixed">#D9E3F9</color> - <color name="md_theme_light_onSecondaryFixed">#111C2B</color> - <color name="md_theme_light_secondaryFixedDim">#B0BDD3</color> - <color name="md_theme_light_onSecondaryFixedVariant">#445670</color> - <color name="md_theme_light_tertiaryFixed">#D1E4FF</color> - <color name="md_theme_light_onTertiaryFixed">#001C39</color> - <color name="md_theme_light_tertiaryFixedDim">#A2CDFF</color> - <color name="md_theme_light_onTertiaryFixedVariant">#0C5EA5</color> - <color name="md_theme_light_surfaceDim">#DADDE5</color> - <color name="md_theme_light_surfaceBright">#FFFFFF</color> - <color name="md_theme_light_surfaceContainerLowest">#FFFFFF</color> - <color name="md_theme_light_surfaceContainerLow">#F5F7FC</color> - <color name="md_theme_light_surfaceContainer">#F0F2F7</color> - <color name="md_theme_light_surfaceContainerHigh">#EAECEF</color> - <color name="md_theme_light_surfaceContainerHighest">#E3E6EB</color> - <color name="md_theme_light_primary_mediumContrast">#00318F</color> - <color name="md_theme_light_onPrimary_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_primaryContainer_mediumContrast">#0042B3</color> - <color name="md_theme_light_onPrimaryContainer_mediumContrast">#E5EBFF</color> - <color name="md_theme_light_secondary_mediumContrast">#3E4F6A</color> - <color name="md_theme_light_onSecondary_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_secondaryContainer_mediumContrast">#7082A0</color> - <color name="md_theme_light_onSecondaryContainer_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_tertiary_mediumContrast">#0B60B0</color> - <color name="md_theme_light_onTertiary_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_tertiaryContainer_mediumContrast">#338AF0</color> - <color name="md_theme_light_onTertiaryContainer_mediumContrast">#E4F1FF</color> - <color name="md_theme_light_error_mediumContrast">#8C1B16</color> - <color name="md_theme_light_onError_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_errorContainer_mediumContrast">#B3261E</color> - <color name="md_theme_light_onErrorContainer_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_background_mediumContrast">#FAFAFD</color> - <color name="md_theme_light_onBackground_mediumContrast">#1A1C1F</color> - <color name="md_theme_light_surface_mediumContrast">#FAFAFD</color> - <color name="md_theme_light_onSurface_mediumContrast">#131518</color> - <color name="md_theme_light_surfaceVariant_mediumContrast">#DADDE5</color> - <color name="md_theme_light_onSurfaceVariant_mediumContrast">#36383E</color> - <color name="md_theme_light_outline_mediumContrast">#585B63</color> - <color name="md_theme_light_outlineVariant_mediumContrast">#AEB1BB</color> - <color name="md_theme_light_scrim_mediumContrast">#000000</color> - <color name="md_theme_light_inverseSurface_mediumContrast">#2C2F3A</color> - <color name="md_theme_light_inverseOnSurface_mediumContrast">#F0F2FF</color> - <color name="md_theme_light_inversePrimary_mediumContrast">#B4C5FF</color> - <color name="md_theme_light_primaryFixed_mediumContrast">#3C66C9</color> - <color name="md_theme_light_onPrimaryFixed_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_primaryFixedDim_mediumContrast">#2455B5</color> - <color name="md_theme_light_onPrimaryFixedVariant_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_secondaryFixed_mediumContrast">#6E809B</color> - <color name="md_theme_light_onSecondaryFixed_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_secondaryFixedDim_mediumContrast">#4F6079</color> - <color name="md_theme_light_onSecondaryFixedVariant_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_tertiaryFixed_mediumContrast">#60A6E7</color> - <color name="md_theme_light_onTertiaryFixed_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_tertiaryFixedDim_mediumContrast">#207BC0</color> - <color name="md_theme_light_onTertiaryFixedVariant_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_surfaceDim_mediumContrast">#D5D9E1</color> - <color name="md_theme_light_surfaceBright_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_surfaceContainerLowest_mediumContrast">#FFFFFF</color> - <color name="md_theme_light_surfaceContainerLow_mediumContrast">#F4F7FC</color> - <color name="md_theme_light_surfaceContainer_mediumContrast">#EEF1F8</color> - <color name="md_theme_light_surfaceContainerHigh_mediumContrast">#E6EAF1</color> - <color name="md_theme_light_surfaceContainerHighest_mediumContrast">#DEE2EA</color> - <color name="md_theme_light_primary_highContrast">#002A7A</color> - <color name="md_theme_light_onPrimary_highContrast">#FFFFFF</color> - <color name="md_theme_light_primaryContainer_highContrast">#003EA8</color> - <color name="md_theme_light_onPrimaryContainer_highContrast">#FFFFFF</color> - <color name="md_theme_light_secondary_highContrast">#2D3E59</color> - <color name="md_theme_light_onSecondary_highContrast">#FFFFFF</color> - <color name="md_theme_light_secondaryContainer_highContrast">#445670</color> - <color name="md_theme_light_onSecondaryContainer_highContrast">#FFFFFF</color> - <color name="md_theme_light_tertiary_highContrast">#004A99</color> - <color name="md_theme_light_onTertiary_highContrast">#FFFFFF</color> - <color name="md_theme_light_tertiaryContainer_highContrast">#0B60B0</color> - <color name="md_theme_light_onTertiaryContainer_highContrast">#FFFFFF</color> - <color name="md_theme_light_error_highContrast">#6A1410</color> - <color name="md_theme_light_onError_highContrast">#FFFFFF</color> - <color name="md_theme_light_errorContainer_highContrast">#951C18</color> - <color name="md_theme_light_onErrorContainer_highContrast">#FFFFFF</color> - <color name="md_theme_light_background_highContrast">#F8F9FF</color> - <color name="md_theme_light_onBackground_highContrast">#101113</color> - <color name="md_theme_light_surface_highContrast">#F8F9FF</color> - <color name="md_theme_light_onSurface_highContrast">#000000</color> - <color name="md_theme_light_surfaceVariant_highContrast">#DADDE5</color> - <color name="md_theme_light_onSurfaceVariant_highContrast">#000000</color> - <color name="md_theme_light_outline_highContrast">#2B2D33</color> - <color name="md_theme_light_outlineVariant_highContrast">#4B4D55</color> - <color name="md_theme_light_scrim_highContrast">#000000</color> - <color name="md_theme_light_inverseSurface_highContrast">#2C2F3A</color> - <color name="md_theme_light_inverseOnSurface_highContrast">#FFFFFF</color> - <color name="md_theme_light_inversePrimary_highContrast">#B4C5FF</color> - <color name="md_theme_light_primaryFixed_highContrast">#0040AD</color> - <color name="md_theme_light_onPrimaryFixed_highContrast">#FFFFFF</color> - <color name="md_theme_light_primaryFixedDim_highContrast">#002C7D</color> - <color name="md_theme_light_onPrimaryFixedVariant_highContrast">#FFFFFF</color> - <color name="md_theme_light_secondaryFixed_highContrast">#445670</color> - <color name="md_theme_light_onSecondaryFixed_highContrast">#FFFFFF</color> - <color name="md_theme_light_secondaryFixedDim_highContrast">#2E3F59</color> - <color name="md_theme_light_onSecondaryFixedVariant_highContrast">#FFFFFF</color> - <color name="md_theme_light_tertiaryFixed_highContrast">#0B60B0</color> - <color name="md_theme_light_onTertiaryFixed_highContrast">#FFFFFF</color> - <color name="md_theme_light_tertiaryFixedDim_highContrast">#004A8C</color> - <color name="md_theme_light_onTertiaryFixedVariant_highContrast">#FFFFFF</color> - <color name="md_theme_light_surfaceDim_highContrast">#C1C4CC</color> - <color name="md_theme_light_surfaceBright_highContrast">#FFFFFF</color> - <color name="md_theme_light_surfaceContainerLowest_highContrast">#FFFFFF</color> - <color name="md_theme_light_surfaceContainerLow_highContrast">#F3F6FA</color> - <color name="md_theme_light_surfaceContainer_highContrast">#E5E8EE</color> - <color name="md_theme_light_surfaceContainerHigh_highContrast">#D7DAE1</color> - <color name="md_theme_light_surfaceContainerHighest_highContrast">#C9CCD4</color> - <color name="md_theme_dark_primary">#B4C5FF</color> - <color name="md_theme_dark_onPrimary">#002A78</color> - <color name="md_theme_dark_primaryContainer">#0042B3</color> - <color name="md_theme_dark_onPrimaryContainer">#E5EBFF</color> - <color name="md_theme_dark_secondary">#A4C9FF</color> - <color name="md_theme_dark_onSecondary">#00315D</color> - <color name="md_theme_dark_secondaryContainer">#72A3E5</color> - <color name="md_theme_dark_onSecondaryContainer">#003869</color> - <color name="md_theme_dark_tertiary">#8DD1E5</color> - <color name="md_theme_dark_onTertiary">#003641</color> - <color name="md_theme_dark_tertiaryContainer">#166577</color> - <color name="md_theme_dark_onTertiaryContainer">#9CE0F5</color> - <color name="md_theme_dark_error">#FFB4AA</color> - <color name="md_theme_dark_onError">#690003</color> - <color name="md_theme_dark_errorContainer">#B3261E</color> - <color name="md_theme_dark_onErrorContainer">#FFCBC4</color> - <color name="md_theme_dark_background">#11131A</color> - <color name="md_theme_dark_onBackground">#E2E2EB</color> - <color name="md_theme_dark_surface">#11131A</color> - <color name="md_theme_dark_onSurface">#E5E2E1</color> - <color name="md_theme_dark_surfaceVariant">#45474B</color> - <color name="md_theme_dark_onSurfaceVariant">#C6C6CB</color> - <color name="md_theme_dark_outline">#8F9095</color> - <color name="md_theme_dark_outlineVariant">#45474B</color> - <color name="md_theme_dark_scrim">#000000</color> - <color name="md_theme_dark_inverseSurface">#E5E2E1</color> - <color name="md_theme_dark_inverseOnSurface">#313030</color> - <color name="md_theme_dark_inversePrimary">#2756C7</color> - <color name="md_theme_dark_primaryFixed">#DBE1FF</color> - <color name="md_theme_dark_onPrimaryFixed">#00174B</color> - <color name="md_theme_dark_primaryFixedDim">#B4C5FF</color> - <color name="md_theme_dark_onPrimaryFixedVariant">#003EA8</color> - <color name="md_theme_dark_secondaryFixed">#D4E3FF</color> - <color name="md_theme_dark_onSecondaryFixed">#001C39</color> - <color name="md_theme_dark_secondaryFixedDim">#A4C9FF</color> - <color name="md_theme_dark_onSecondaryFixedVariant">#004883</color> - <color name="md_theme_dark_tertiaryFixed">#AFECFF</color> - <color name="md_theme_dark_onTertiaryFixed">#001F27</color> - <color name="md_theme_dark_tertiaryFixedDim">#8DD1E5</color> - <color name="md_theme_dark_onTertiaryFixedVariant">#004E5D</color> - <color name="md_theme_dark_surfaceDim">#11131A</color> - <color name="md_theme_dark_surfaceBright">#3A3939</color> - <color name="md_theme_dark_surfaceContainerLowest">#0E0E0E</color> - <color name="md_theme_dark_surfaceContainerLow">#1C1B1B</color> - <color name="md_theme_dark_surfaceContainer">#201F1F</color> - <color name="md_theme_dark_surfaceContainerHigh">#2A2A2A</color> - <color name="md_theme_dark_surfaceContainerHighest">#353434</color> - <color name="md_theme_dark_primary_mediumContrast">#D3DBFF</color> - <color name="md_theme_dark_onPrimary_mediumContrast">#002061</color> - <color name="md_theme_dark_primaryContainer_mediumContrast">#628BFD</color> - <color name="md_theme_dark_onPrimaryContainer_mediumContrast">#000000</color> - <color name="md_theme_dark_secondary_mediumContrast">#C9DEFF</color> - <color name="md_theme_dark_onSecondary_mediumContrast">#00264A</color> - <color name="md_theme_dark_secondaryContainer_mediumContrast">#72A3E5</color> - <color name="md_theme_dark_onSecondaryContainer_mediumContrast">#00152D</color> - <color name="md_theme_dark_tertiary_mediumContrast">#A3E7FC</color> - <color name="md_theme_dark_onTertiary_mediumContrast">#002A33</color> - <color name="md_theme_dark_tertiaryContainer_mediumContrast">#569AAD</color> - <color name="md_theme_dark_onTertiaryContainer_mediumContrast">#000000</color> - <color name="md_theme_dark_error_mediumContrast">#FFD2CC</color> - <color name="md_theme_dark_onError_mediumContrast">#540002</color> - <color name="md_theme_dark_errorContainer_mediumContrast">#FA5A4A</color> - <color name="md_theme_dark_onErrorContainer_mediumContrast">#000000</color> - <color name="md_theme_dark_background_mediumContrast">#11131A</color> - <color name="md_theme_dark_onBackground_mediumContrast">#E2E2EB</color> - <color name="md_theme_dark_surface_mediumContrast">#11131A</color> - <color name="md_theme_dark_onSurface_mediumContrast">#FFFFFF</color> - <color name="md_theme_dark_surfaceVariant_mediumContrast">#45474B</color> - <color name="md_theme_dark_onSurfaceVariant_mediumContrast">#DCDCE1</color> - <color name="md_theme_dark_outline_mediumContrast">#B1B2B6</color> - <color name="md_theme_dark_outlineVariant_mediumContrast">#8F9095</color> - <color name="md_theme_dark_scrim_mediumContrast">#000000</color> - <color name="md_theme_dark_inverseSurface_mediumContrast">#E5E2E1</color> - <color name="md_theme_dark_inverseOnSurface_mediumContrast">#2A2A2A</color> - <color name="md_theme_dark_inversePrimary_mediumContrast">#003FAB</color> - <color name="md_theme_dark_primaryFixed_mediumContrast">#DBE1FF</color> - <color name="md_theme_dark_onPrimaryFixed_mediumContrast">#000E35</color> - <color name="md_theme_dark_primaryFixedDim_mediumContrast">#B4C5FF</color> - <color name="md_theme_dark_onPrimaryFixedVariant_mediumContrast">#002F84</color> - <color name="md_theme_dark_secondaryFixed_mediumContrast">#D4E3FF</color> - <color name="md_theme_dark_onSecondaryFixed_mediumContrast">#001127</color> - <color name="md_theme_dark_secondaryFixedDim_mediumContrast">#A4C9FF</color> - <color name="md_theme_dark_onSecondaryFixedVariant_mediumContrast">#003767</color> - <color name="md_theme_dark_tertiaryFixed_mediumContrast">#AFECFF</color> - <color name="md_theme_dark_onTertiaryFixed_mediumContrast">#001419</color> - <color name="md_theme_dark_tertiaryFixedDim_mediumContrast">#8DD1E5</color> - <color name="md_theme_dark_onTertiaryFixedVariant_mediumContrast">#003C48</color> - <color name="md_theme_dark_surfaceDim_mediumContrast">#11131A</color> - <color name="md_theme_dark_surfaceBright_mediumContrast">#454444</color> - <color name="md_theme_dark_surfaceContainerLowest_mediumContrast">#070707</color> - <color name="md_theme_dark_surfaceContainerLow_mediumContrast">#1E1D1D</color> - <color name="md_theme_dark_surfaceContainer_mediumContrast">#282828</color> - <color name="md_theme_dark_surfaceContainerHigh_mediumContrast">#333232</color> - <color name="md_theme_dark_surfaceContainerHighest_mediumContrast">#3E3D3D</color> - <color name="md_theme_dark_primary_highContrast">#EDEFFF</color> - <color name="md_theme_dark_onPrimary_highContrast">#000000</color> - <color name="md_theme_dark_primaryContainer_highContrast">#AEC1FF</color> - <color name="md_theme_dark_onPrimaryContainer_highContrast">#000928</color> - <color name="md_theme_dark_secondary_highContrast">#EAF0FF</color> - <color name="md_theme_dark_onSecondary_highContrast">#000000</color> - <color name="md_theme_dark_secondaryContainer_highContrast">#9DC5FF</color> - <color name="md_theme_dark_onSecondaryContainer_highContrast">#000B1D</color> - <color name="md_theme_dark_tertiary_highContrast">#D8F5FF</color> - <color name="md_theme_dark_onTertiary_highContrast">#000000</color> - <color name="md_theme_dark_tertiaryContainer_highContrast">#89CDE1</color> - <color name="md_theme_dark_onTertiaryContainer_highContrast">#000D12</color> - <color name="md_theme_dark_error_highContrast">#FFECE9</color> - <color name="md_theme_dark_onError_highContrast">#000000</color> - <color name="md_theme_dark_errorContainer_highContrast">#FFAEA3</color> - <color name="md_theme_dark_onErrorContainer_highContrast">#220000</color> - <color name="md_theme_dark_background_highContrast">#11131A</color> - <color name="md_theme_dark_onBackground_highContrast">#E2E2EB</color> - <color name="md_theme_dark_surface_highContrast">#11131A</color> - <color name="md_theme_dark_onSurface_highContrast">#FFFFFF</color> - <color name="md_theme_dark_surfaceVariant_highContrast">#45474B</color> - <color name="md_theme_dark_onSurfaceVariant_highContrast">#FFFFFF</color> - <color name="md_theme_dark_outline_highContrast">#EFEFF5</color> - <color name="md_theme_dark_outlineVariant_highContrast">#C2C2C7</color> - <color name="md_theme_dark_scrim_highContrast">#000000</color> - <color name="md_theme_dark_inverseSurface_highContrast">#E5E2E1</color> - <color name="md_theme_dark_inverseOnSurface_highContrast">#000000</color> - <color name="md_theme_dark_inversePrimary_highContrast">#003FAB</color> - <color name="md_theme_dark_primaryFixed_highContrast">#DBE1FF</color> - <color name="md_theme_dark_onPrimaryFixed_highContrast">#000000</color> - <color name="md_theme_dark_primaryFixedDim_highContrast">#B4C5FF</color> - <color name="md_theme_dark_onPrimaryFixedVariant_highContrast">#000E35</color> - <color name="md_theme_dark_secondaryFixed_highContrast">#D4E3FF</color> - <color name="md_theme_dark_onSecondaryFixed_highContrast">#000000</color> - <color name="md_theme_dark_secondaryFixedDim_highContrast">#A4C9FF</color> - <color name="md_theme_dark_onSecondaryFixedVariant_highContrast">#001127</color> - <color name="md_theme_dark_tertiaryFixed_highContrast">#AFECFF</color> - <color name="md_theme_dark_onTertiaryFixed_highContrast">#000000</color> - <color name="md_theme_dark_tertiaryFixedDim_highContrast">#8DD1E5</color> - <color name="md_theme_dark_onTertiaryFixedVariant_highContrast">#001419</color> - <color name="md_theme_dark_surfaceDim_highContrast">#11131A</color> - <color name="md_theme_dark_surfaceBright_highContrast">#515050</color> - <color name="md_theme_dark_surfaceContainerLowest_highContrast">#000000</color> - <color name="md_theme_dark_surfaceContainerLow_highContrast">#201F1F</color> - <color name="md_theme_dark_surfaceContainer_highContrast">#313030</color> - <color name="md_theme_dark_surfaceContainerHigh_highContrast">#3C3B3B</color> - <color name="md_theme_dark_surfaceContainerHighest_highContrast">#474646</color> </resources> diff --git a/wallet/src/main/res/values/defaults.xml b/wallet/src/main/res/values/defaults.xml @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?><!-- - ~ This file is part of GNU Taler - ~ (C) 2020 Taler Systems S.A. - ~ - ~ GNU Taler is free software; you can redistribute it and/or modify it under the - ~ terms of the GNU General Public License as published by the Free Software - ~ Foundation; either version 3, or (at your option) any later version. - ~ - ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - ~ A PARTICULAR PURPOSE. See the GNU General Public License for more details. - ~ - ~ You should have received a copy of the GNU General Public License along with - ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - --> - -<resources> - -</resources> -\ No newline at end of file diff --git a/wallet/src/main/res/values/styles.xml b/wallet/src/main/res/values/styles.xml @@ -14,76 +14,12 @@ ~ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --> -<resources xmlns:tools="http://schemas.android.com/tools"> +<resources> - <style name="AppTheme.Light" parent="Theme.Material3.Light"> - <!-- Material 3 theme builder --> - <item name="colorPrimary">@color/md_theme_light_primary</item> - <item name="colorOnPrimary">@color/md_theme_light_onPrimary</item> - <item name="colorPrimaryContainer">@color/md_theme_light_primaryContainer</item> - <item name="colorOnPrimaryContainer">@color/md_theme_light_onPrimaryContainer</item> - <item name="colorSecondary">@color/md_theme_light_secondary</item> - <item name="colorOnSecondary">@color/md_theme_light_onSecondary</item> - <item name="colorSecondaryContainer">@color/md_theme_light_secondaryContainer</item> - <item name="colorOnSecondaryContainer">@color/md_theme_light_onSecondaryContainer</item> - <item name="colorTertiary">@color/md_theme_light_tertiary</item> - <item name="colorOnTertiary">@color/md_theme_light_onTertiary</item> - <item name="colorTertiaryContainer">@color/md_theme_light_tertiaryContainer</item> - <item name="colorOnTertiaryContainer">@color/md_theme_light_onTertiaryContainer</item> - <item name="colorError">@color/md_theme_light_error</item> - <item name="colorErrorContainer">@color/md_theme_light_errorContainer</item> - <item name="colorOnError">@color/md_theme_light_onError</item> - <item name="colorOnErrorContainer">@color/md_theme_light_onErrorContainer</item> - <item name="android:colorBackground">@color/md_theme_light_background</item> - <item name="colorOnBackground">@color/md_theme_light_onBackground</item> - <item name="colorSurface">@color/md_theme_light_surface</item> - <item name="colorOnSurface">@color/md_theme_light_onSurface</item> - <item name="colorSurfaceVariant">@color/md_theme_light_surfaceVariant</item> - <item name="colorOnSurfaceVariant">@color/md_theme_light_onSurfaceVariant</item> - <item name="colorOutline">@color/md_theme_light_outline</item> - <item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item> - <item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item> - <item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item> - </style> - - <style name="AppTheme.Dark" parent="Theme.Material3.Dark"> - <item name="windowActionModeOverlay">true</item> - <item name="android:statusBarColor" tools:targetApi="m">?colorSurface</item> - <item name="android:windowLightStatusBar" tools:targetApi="m">false</item> - <item name="android:navigationBarColor" tools:targetApi="o_mr1">?colorSurface</item> - <item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item> - - <!-- Material 3 theme builder --> - <item name="colorPrimary">@color/md_theme_dark_primary</item> - <item name="colorOnPrimary">@color/md_theme_dark_onPrimary</item> - <item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item> - <item name="colorOnPrimaryContainer">@color/md_theme_dark_onPrimaryContainer</item> - <item name="colorSecondary">@color/md_theme_dark_secondary</item> - <item name="colorOnSecondary">@color/md_theme_dark_onSecondary</item> - <item name="colorSecondaryContainer">@color/md_theme_dark_secondaryContainer</item> - <item name="colorOnSecondaryContainer">@color/md_theme_dark_onSecondaryContainer</item> - <item name="colorTertiary">@color/md_theme_dark_tertiary</item> - <item name="colorOnTertiary">@color/md_theme_dark_onTertiary</item> - <item name="colorTertiaryContainer">@color/md_theme_dark_tertiaryContainer</item> - <item name="colorOnTertiaryContainer">@color/md_theme_dark_onTertiaryContainer</item> - <item name="colorError">@color/md_theme_dark_error</item> - <item name="colorErrorContainer">@color/md_theme_dark_errorContainer</item> - <item name="colorOnError">@color/md_theme_dark_onError</item> - <item name="colorOnErrorContainer">@color/md_theme_dark_onErrorContainer</item> - <item name="android:colorBackground">@color/md_theme_dark_background</item> - <item name="colorOnBackground">@color/md_theme_dark_onBackground</item> - <item name="colorSurface">@color/md_theme_dark_surface</item> - <item name="colorOnSurface">@color/md_theme_dark_onSurface</item> - <item name="colorSurfaceVariant">@color/md_theme_dark_surfaceVariant</item> - <item name="colorOnSurfaceVariant">@color/md_theme_dark_onSurfaceVariant</item> - <item name="colorOutline">@color/md_theme_dark_outline</item> - <item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item> - <item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item> - <item name="colorPrimaryInverse">@color/md_theme_dark_inversePrimary</item> - </style> - - <style name="AppTheme" parent="AppTheme.Light"> + <style name="AppTheme" parent="Theme.Material3.DayNight.NoActionBar"> <item name="windowActionModeOverlay">true</item> + <!-- Use the primary color from colors.xml for the splash/initial window --> + <item name="colorPrimary">@color/colorPrimary</item> </style> <style name="AppTheme.NoActionBar"> @@ -91,6 +27,7 @@ <item name="windowNoTitle">true</item> </style> + <!-- Legacy styles for non-Compose components if needed --> <style name="TransactionTitle"> <item name="android:textAppearance">@style/TextAppearance.Material3.TitleMedium</item> </style>