[MWA-5265] Meta Demo: Theming via xml
{cr fixes}
This commit is contained in:
parent
22a13ded99
commit
907e74114a
@ -57,6 +57,7 @@ dependencies {
|
|||||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'androidx.compose.foundation:foundation-layout:1.9.4'
|
implementation 'androidx.compose.foundation:foundation-layout:1.9.4'
|
||||||
|
implementation 'androidx.compose.foundation:foundation:1.9.5'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
||||||
@ -84,15 +85,9 @@ dependencies {
|
|||||||
|
|
||||||
implementation("de.webid-solutions:android_document_scanner:20.3.0-SNAPSHOT")
|
implementation("de.webid-solutions:android_document_scanner:20.3.0-SNAPSHOT")
|
||||||
|
|
||||||
api("de.webid-solutions:android_ui_components:20.3.+") {
|
|
||||||
changing = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compose Core Dependencies
|
// Compose Core Dependencies
|
||||||
implementation 'androidx.compose.ui:ui'
|
implementation 'androidx.compose.ui:ui'
|
||||||
implementation 'androidx.compose.ui:ui-graphics'
|
|
||||||
implementation 'androidx.compose.ui:ui-tooling-preview'
|
implementation 'androidx.compose.ui:ui-tooling-preview'
|
||||||
implementation 'androidx.compose.material3:material3'
|
|
||||||
implementation 'androidx.activity:activity-compose:1.9.3'
|
implementation 'androidx.activity:activity-compose:1.9.3'
|
||||||
implementation 'androidx.compose.ui:ui-tooling-preview'
|
implementation 'androidx.compose.ui:ui-tooling-preview'
|
||||||
debugImplementation 'androidx.compose.ui:ui-tooling'
|
debugImplementation 'androidx.compose.ui:ui-tooling'
|
||||||
|
|||||||
@ -51,7 +51,7 @@ private val config = VideoOptionsConfig(
|
|||||||
)
|
)
|
||||||
|
|
||||||
// TODO insert your Action id
|
// TODO insert your Action id
|
||||||
private const val actionId = "<9_digit_webid_transaction_id>"
|
private const val actionId = "347397703"
|
||||||
|
|
||||||
// TODO choose your environment
|
// TODO choose your environment
|
||||||
private val chosenEnvironment: EWebIDEnv = EWebIDEnv.TEST
|
private val chosenEnvironment: EWebIDEnv = EWebIDEnv.TEST
|
||||||
@ -78,8 +78,8 @@ internal class MainActivity : ComponentActivity
|
|||||||
MetaPluginDemoScene(
|
MetaPluginDemoScene(
|
||||||
result = result,
|
result = result,
|
||||||
onStartClicked = { userConfiguration ->
|
onStartClicked = { userConfiguration ->
|
||||||
clearLog()
|
clearResult()
|
||||||
writeLog(getString(R.string.starting))
|
showResult(getString(R.string.starting))
|
||||||
createCoreSdk(
|
createCoreSdk(
|
||||||
userConfiguration = userConfiguration
|
userConfiguration = userConfiguration
|
||||||
)
|
)
|
||||||
@ -99,7 +99,7 @@ internal class MainActivity : ComponentActivity
|
|||||||
private fun createCoreSdk(
|
private fun createCoreSdk(
|
||||||
userConfiguration: UserConfiguration
|
userConfiguration: UserConfiguration
|
||||||
) {
|
) {
|
||||||
writeLog(getString(R.string.creating_core_sdk))
|
showResult(getString(R.string.creating_core_sdk))
|
||||||
|
|
||||||
// should be provided to you -> currently just using demo credentials
|
// should be provided to you -> currently just using demo credentials
|
||||||
val selectedUri: URI = chosenEnvironment.uri
|
val selectedUri: URI = chosenEnvironment.uri
|
||||||
@ -112,14 +112,14 @@ internal class MainActivity : ComponentActivity
|
|||||||
*chosenEnvironment.shaPins
|
*chosenEnvironment.shaPins
|
||||||
)
|
)
|
||||||
|
|
||||||
writeLog(getString(R.string.core_sdk_creation_successful))
|
showResult(getString(R.string.core_sdk_creation_successful))
|
||||||
validateActionId()
|
validateActionId()
|
||||||
|
|
||||||
val selectProductPlugins = getSelectedPlugins(
|
val selectProductPlugins = getSelectedPlugins(
|
||||||
useAutoIdent = userConfiguration.useAutoIdent,
|
useAutoIdent = userConfiguration.useAutoIdent,
|
||||||
usePayOnServer = userConfiguration.useAcountId,
|
usePayOnServer = userConfiguration.useAcountId,
|
||||||
useEidOnServer = userConfiguration.useEId,
|
useEidOnServer = userConfiguration.useEId,
|
||||||
useVideo = userConfiguration.useVideoIdent
|
useVideoIdent = userConfiguration.useVideoIdent
|
||||||
)
|
)
|
||||||
|
|
||||||
val metaPlugin = WebIdMetaPlugin(
|
val metaPlugin = WebIdMetaPlugin(
|
||||||
@ -143,7 +143,7 @@ internal class MainActivity : ComponentActivity
|
|||||||
* Validates the WebID actionID
|
* Validates the WebID actionID
|
||||||
*/
|
*/
|
||||||
private fun validateActionId() {
|
private fun validateActionId() {
|
||||||
writeLog(getString(R.string.validate_action_id))
|
showResult(getString(R.string.validate_action_id))
|
||||||
|
|
||||||
try {
|
try {
|
||||||
parseInt(actionId)
|
parseInt(actionId)
|
||||||
@ -151,7 +151,7 @@ internal class MainActivity : ComponentActivity
|
|||||||
throw NumberFormatException()
|
throw NumberFormatException()
|
||||||
}
|
}
|
||||||
} catch (e: NumberFormatException) {
|
} catch (e: NumberFormatException) {
|
||||||
writeLog(getString(R.string.action_id_not_valid))
|
showResult(getString(R.string.action_id_not_valid))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,14 +165,14 @@ internal class MainActivity : ComponentActivity
|
|||||||
useAutoIdent: Boolean,
|
useAutoIdent: Boolean,
|
||||||
usePayOnServer: Boolean,
|
usePayOnServer: Boolean,
|
||||||
useEidOnServer: Boolean,
|
useEidOnServer: Boolean,
|
||||||
useVideo: Boolean
|
useVideoIdent: Boolean
|
||||||
): ArrayList<IProductPluginWebId> {
|
): ArrayList<IProductPluginWebId> {
|
||||||
return ArrayList(
|
return ArrayList(
|
||||||
listOfNotNull(
|
listOfNotNull(
|
||||||
if (useAutoIdent) AutoIdProductPlugin() else null,
|
if (useAutoIdent) AutoIdProductPlugin() else null,
|
||||||
if (usePayOnServer) AccountIdProductPlugin() else null,
|
if (usePayOnServer) AccountIdProductPlugin() else null,
|
||||||
if (useEidOnServer) EIdProductPlugin() else null,
|
if (useEidOnServer) EIdProductPlugin() else null,
|
||||||
if (useVideo) VideoIdProductPlugin(config) else null,
|
if (useVideoIdent) VideoIdProductPlugin(config) else null,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -205,11 +205,11 @@ internal class MainActivity : ComponentActivity
|
|||||||
}
|
}
|
||||||
} catch (e: WebIdMobileAppSdkException) {
|
} catch (e: WebIdMobileAppSdkException) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
writeLog(e.message.toString())
|
showResult(e.message.toString())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
val metaPluginVerifyError = result.errorResult
|
val metaPluginVerifyError = result.errorResult
|
||||||
writeLog(metaPluginVerifyError.toString())
|
showResult(metaPluginVerifyError.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ internal class MainActivity : ComponentActivity
|
|||||||
result += " $resultInfo"
|
result += " $resultInfo"
|
||||||
// your code to handle the successful plugin execution
|
// your code to handle the successful plugin execution
|
||||||
}
|
}
|
||||||
writeLog(result)
|
showResult(result)
|
||||||
} else {
|
} else {
|
||||||
// failure case
|
// failure case
|
||||||
if (failReason.specificResult != null) {
|
if (failReason.specificResult != null) {
|
||||||
@ -243,53 +243,53 @@ internal class MainActivity : ComponentActivity
|
|||||||
if (specificResult is EMetaPluginFailReason) {
|
if (specificResult is EMetaPluginFailReason) {
|
||||||
if (specificResult == EMetaPluginFailReason.EID_PENDING_AUTHADA) {
|
if (specificResult == EMetaPluginFailReason.EID_PENDING_AUTHADA) {
|
||||||
// handle EID_PENDING_AUTHADA as described in code documentation
|
// handle EID_PENDING_AUTHADA as described in code documentation
|
||||||
writeLog("EID_PENDING_AUTHADA")
|
showResult("EID_PENDING_AUTHADA")
|
||||||
} else {
|
} else {
|
||||||
// handle all other EMetaPluginFailReason as described in code documentation
|
// handle all other EMetaPluginFailReason as described in code documentation
|
||||||
writeLog("MetaPluginFailReason: $specificResult")
|
showResult("MetaPluginFailReason: $specificResult")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// handle EVideoIdentProductPluginFailReasons
|
// handle EVideoIdentProductPluginFailReasons
|
||||||
if (specificResult is VideoIdProductFailReason) {
|
if (specificResult is VideoIdProductFailReason) {
|
||||||
if (specificResult == VideoIdProductFailReason.CALL_CENTER_CLOSED) {
|
if (specificResult == VideoIdProductFailReason.CALL_CENTER_CLOSED) {
|
||||||
// handle CALL_CENTER_CLOSED as described in code documentation
|
// handle CALL_CENTER_CLOSED as described in code documentation
|
||||||
writeLog("CALL_CENTER_CLOSED")
|
showResult("CALL_CENTER_CLOSED")
|
||||||
} else {
|
} else {
|
||||||
// handle all other EVideoIdentProductPluginFailReasons errors as described in the code documentation
|
// handle all other EVideoIdentProductPluginFailReasons errors as described in the code documentation
|
||||||
writeLog("VideoIdentFailReason: $specificResult")
|
showResult("VideoIdentFailReason: $specificResult")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (failReason.genericResult == EProductPluginErrors.UNKNOWN) {
|
if (failReason.genericResult == EProductPluginErrors.UNKNOWN) {
|
||||||
// handle UNKNOWN as described in code documentation
|
// handle UNKNOWN as described in code documentation
|
||||||
writeLog("Unknown Error")
|
showResult("Unknown Error")
|
||||||
} else {
|
} else {
|
||||||
// handle all other EProductPluginErrors errors as described in the code documentation
|
// handle all other EProductPluginErrors errors as described in the code documentation
|
||||||
writeLog("Error: ${failReason.genericResult}")
|
showResult("Error: ${failReason.genericResult}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: WebIdPluginInterruptedException) {
|
} catch (e: WebIdPluginInterruptedException) {
|
||||||
// Handle interruption in your preferred way
|
// Handle interruption in your preferred way
|
||||||
writeLog("Plugin interrupted: ${e.message}")
|
showResult("Plugin interrupted: ${e.message}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MISC */
|
/* MISC */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an entry to the log.
|
* Add an entry to the result.
|
||||||
*/
|
*/
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
private fun writeLog(entry: String) {
|
private fun showResult(entry: String) {
|
||||||
result += "$entry\n"
|
result += "$entry\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the text log of this activity.
|
* Resets the text result of this activity.
|
||||||
*/
|
*/
|
||||||
private fun clearLog() {
|
private fun clearResult() {
|
||||||
result = ""
|
result = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,10 +10,8 @@ import androidx.compose.foundation.layout.fillMaxSize
|
|||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.systemBarsPadding
|
import androidx.compose.foundation.layout.systemBarsPadding
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.verticalScroll
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
@ -21,11 +19,12 @@ import androidx.compose.runtime.setValue
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
import de.webidsolutions.android_ui_components.theming.v4.SpacingV4
|
import de.webidsolutions.android_ui_components.theming.v4.SpacingV4
|
||||||
import de.webidsolutions.android_ui_components.theming.v4.WebIdThemeProviderV4
|
import de.webidsolutions.android_ui_components.theming.v4.WebIdThemeProviderV4
|
||||||
|
import de.webidsolutions.android_ui_components.theming.v4.components.checkbox.CheckboxTyp
|
||||||
import de.webidsolutions.android_ui_components.theming.v4.components.checkbox.CheckboxV4
|
import de.webidsolutions.android_ui_components.theming.v4.components.checkbox.CheckboxV4
|
||||||
import de.webidsolutions.android_ui_components.theming.v4.components.primary_button.PrimaryButtonV4
|
import de.webidsolutions.android_ui_components.theming.v4.components.primary_button.PrimaryButtonV4
|
||||||
import de.webidsolutions.android_ui_components.theming.v4.components.surface.Surface
|
|
||||||
import de.webidsolutions.android_ui_components.theming.v4.components.text.TextV4
|
import de.webidsolutions.android_ui_components.theming.v4.components.text.TextV4
|
||||||
import de.webidsolutions.metaplugindemo.R
|
import de.webidsolutions.metaplugindemo.R
|
||||||
|
|
||||||
@ -39,22 +38,27 @@ fun MetaPluginDemoScene(
|
|||||||
var useAutoIdent by remember { mutableStateOf(false) }
|
var useAutoIdent by remember { mutableStateOf(false) }
|
||||||
var usePayOnServer by remember { mutableStateOf(false) }
|
var usePayOnServer by remember { mutableStateOf(false) }
|
||||||
var useEidOnServer by remember { mutableStateOf(false) }
|
var useEidOnServer by remember { mutableStateOf(false) }
|
||||||
var useVideo by remember { mutableStateOf(false) }
|
var useVideoIdent by remember { mutableStateOf(false) }
|
||||||
var useXmlTheming by remember { mutableStateOf(ThemingChoice.COMPOSE) }
|
var useXmlTheming by remember { mutableStateOf(ThemingChoice.COMPOSE) }
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
|
.systemBarsPadding()
|
||||||
|
.padding(top = SpacingV4.N.size)
|
||||||
|
) {
|
||||||
|
LazyColumn(
|
||||||
|
modifier = Modifier
|
||||||
|
.weight(1f)
|
||||||
.padding(
|
.padding(
|
||||||
start = SpacingV4.S.size,
|
start = SpacingV4.S.size,
|
||||||
top = SpacingV4.N.size,
|
top = SpacingV4.N.size,
|
||||||
end = SpacingV4.N.size
|
end = SpacingV4.N.size
|
||||||
)
|
)
|
||||||
.systemBarsPadding()
|
|
||||||
) {
|
) {
|
||||||
|
item {
|
||||||
TextV4(
|
TextV4(
|
||||||
text = stringResource(R.string.choose_plugins),
|
text = stringResource(R.string.choose_plugins),
|
||||||
modifier = Modifier.padding(start = SpacingV4.N.size)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SpacingV4.S.VSpacer()
|
SpacingV4.S.VSpacer()
|
||||||
@ -79,8 +83,8 @@ fun MetaPluginDemoScene(
|
|||||||
)
|
)
|
||||||
|
|
||||||
CheckboxWithLabel(
|
CheckboxWithLabel(
|
||||||
checked = useVideo,
|
checked = useVideoIdent,
|
||||||
onCheckedChange = { useVideo = it },
|
onCheckedChange = { useVideoIdent = it },
|
||||||
label = stringResource(R.string.videoid)
|
label = stringResource(R.string.videoid)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -89,7 +93,6 @@ fun MetaPluginDemoScene(
|
|||||||
|
|
||||||
TextV4(
|
TextV4(
|
||||||
text = stringResource(R.string.choose_theming),
|
text = stringResource(R.string.choose_theming),
|
||||||
modifier = Modifier.padding(start = SpacingV4.N.size)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SpacingV4.S.VSpacer()
|
SpacingV4.S.VSpacer()
|
||||||
@ -102,7 +105,7 @@ fun MetaPluginDemoScene(
|
|||||||
useXmlTheming = ThemingChoice.COMPOSE
|
useXmlTheming = ThemingChoice.COMPOSE
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
label = "Theming with Compose"
|
label = stringResource(R.string.choose_theming_compose)
|
||||||
)
|
)
|
||||||
|
|
||||||
CheckboxWithLabel(
|
CheckboxWithLabel(
|
||||||
@ -112,7 +115,7 @@ fun MetaPluginDemoScene(
|
|||||||
useXmlTheming = ThemingChoice.XML
|
useXmlTheming = ThemingChoice.XML
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
label = "Theming with XML"
|
label = stringResource(R.string.choose_theming_xml)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,38 +123,25 @@ fun MetaPluginDemoScene(
|
|||||||
|
|
||||||
TextV4(
|
TextV4(
|
||||||
text = stringResource(R.string.log_headline),
|
text = stringResource(R.string.log_headline),
|
||||||
modifier = Modifier.padding(start = SpacingV4.N.size)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SpacingV4.S.VSpacer()
|
SpacingV4.S.VSpacer()
|
||||||
|
|
||||||
Box(
|
ResultView(result = result.split("\n"))
|
||||||
modifier = Modifier
|
|
||||||
.weight(1f)
|
|
||||||
.fillMaxWidth()
|
|
||||||
.padding(horizontal = SpacingV4.N.size)
|
|
||||||
) {
|
|
||||||
val scrollState = rememberScrollState()
|
|
||||||
|
|
||||||
LaunchedEffect(result) {
|
|
||||||
scrollState.animateScrollTo(scrollState.maxValue)
|
|
||||||
}
|
|
||||||
|
|
||||||
Surface(
|
|
||||||
modifier = Modifier.fillMaxSize(),
|
|
||||||
) {
|
|
||||||
TextV4(
|
|
||||||
text = result.ifEmpty { stringResource(R.string.log_placeholder) },
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxSize()
|
|
||||||
.verticalScroll(scrollState)
|
|
||||||
.padding(SpacingV4.S.size),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SpacingV4.M.VSpacer()
|
SpacingV4.M.VSpacer()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(
|
||||||
|
start = SpacingV4.S.size,
|
||||||
|
end = SpacingV4.N.size,
|
||||||
|
bottom = SpacingV4.S.size
|
||||||
|
)
|
||||||
|
) {
|
||||||
PrimaryButtonV4(
|
PrimaryButtonV4(
|
||||||
onClick = {
|
onClick = {
|
||||||
onStartClicked(
|
onStartClicked(
|
||||||
@ -159,7 +149,7 @@ fun MetaPluginDemoScene(
|
|||||||
useAutoIdent = useAutoIdent,
|
useAutoIdent = useAutoIdent,
|
||||||
useAcountId = usePayOnServer,
|
useAcountId = usePayOnServer,
|
||||||
useEId = useEidOnServer,
|
useEId = useEidOnServer,
|
||||||
useVideoIdent = useVideo,
|
useVideoIdent = useVideoIdent,
|
||||||
themingChoice = useXmlTheming
|
themingChoice = useXmlTheming
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -167,6 +157,29 @@ fun MetaPluginDemoScene(
|
|||||||
title = stringResource(R.string.start_button),
|
title = stringResource(R.string.start_button),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun ResultView(
|
||||||
|
result: List<String>,
|
||||||
|
modifier: Modifier = Modifier
|
||||||
|
) {
|
||||||
|
if (result.isNotEmpty()) {
|
||||||
|
Column(
|
||||||
|
modifier = modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(16.dp)
|
||||||
|
) {
|
||||||
|
result.forEach { result ->
|
||||||
|
TextV4(
|
||||||
|
text = result,
|
||||||
|
modifier = Modifier.padding(vertical = 4.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
SpacingV4.S.VSpacer()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@ -180,6 +193,7 @@ private fun CheckboxWithLabel(
|
|||||||
isRequired = false,
|
isRequired = false,
|
||||||
onCheckedChange = onCheckedChange,
|
onCheckedChange = onCheckedChange,
|
||||||
text = label,
|
text = label,
|
||||||
|
textTyp = CheckboxTyp.Label,
|
||||||
modifier = Modifier.padding(start = SpacingV4.N.size)
|
modifier = Modifier.padding(start = SpacingV4.N.size)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -188,6 +202,7 @@ private fun CheckboxWithLabel(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Preview(
|
@Preview(
|
||||||
name = "MetaPluginDemoScreen - Long Log",
|
name = "MetaPluginDemoScreen - Long Log",
|
||||||
showBackground = true,
|
showBackground = true,
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* Created by WebID Solutions GmbH | www.webid-solutions.de.
|
||||||
|
* See the file "LICENSE" for the full license governing this code.
|
||||||
|
*/
|
||||||
package de.webidsolutions.metaplugindemo.scenes
|
package de.webidsolutions.metaplugindemo.scenes
|
||||||
|
|
||||||
data class UserConfiguration(
|
data class UserConfiguration(
|
||||||
|
|||||||
@ -6,14 +6,15 @@
|
|||||||
<item name="actionPrimary">#FFD32D1F</item>
|
<item name="actionPrimary">#FFD32D1F</item>
|
||||||
<item name="actionPrimaryPressed">#FF8A1E15</item>
|
<item name="actionPrimaryPressed">#FF8A1E15</item>
|
||||||
<item name="actionPrimaryHover">#FFE57373</item>
|
<item name="actionPrimaryHover">#FFE57373</item>
|
||||||
<item name="actionPrimaryInvert">#FFFFFFFF</item>
|
<item name="actionPrimaryInvert">#FF000000</item>
|
||||||
<item name="actionDisabled">#FFBDBDBD</item>
|
<item name="actionDisabled">#FF666666</item>
|
||||||
|
|
||||||
<item name="brandPrimary">#FFD32D1F</item>
|
<item name="brandPrimary">#FFD32D1F</item>
|
||||||
<item name="brandSecondary">#FF8A1E15</item>
|
<item name="brandSecondary">#FF8A1E15</item>
|
||||||
|
|
||||||
<item name="backgroundPrimary">#FFFFFFFF</item>
|
<item name="backgroundPrimary">#FF121212</item>
|
||||||
<item name="backgroundSecondary">#FFFFFF</item>
|
<item name="backgroundSecondary">#FF1E1E1E</item>
|
||||||
|
<item name="android:fontFamily">monospace</item>
|
||||||
|
<item name="primaryButtonCornerRadius">@dimen/webid_button_corner_radius</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@ -3,4 +3,5 @@
|
|||||||
<dimen name="grid_margin">24dp</dimen>
|
<dimen name="grid_margin">24dp</dimen>
|
||||||
<dimen name="button_height">60dp</dimen>
|
<dimen name="button_height">60dp</dimen>
|
||||||
<dimen name="log_margin">40dp</dimen>
|
<dimen name="log_margin">40dp</dimen>
|
||||||
|
<dimen name="webid_button_corner_radius">8dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
@ -9,4 +9,6 @@
|
|||||||
<string name="validate_action_id">Validate Action-ID…</string>
|
<string name="validate_action_id">Validate Action-ID…</string>
|
||||||
<string name="action_id_not_valid">Failure: The transaction number (Action-ID) was not set to 9-digit number string in MainActivity.kt file.</string>
|
<string name="action_id_not_valid">Failure: The transaction number (Action-ID) was not set to 9-digit number string in MainActivity.kt file.</string>
|
||||||
<string name="choose_theming">Choose A Theme:</string>
|
<string name="choose_theming">Choose A Theme:</string>
|
||||||
|
<string name="choose_theming_compose">Theming with Compose</string>
|
||||||
|
<string name="choose_theming_xml">Theming with XML</string>
|
||||||
</resources>
|
</resources>
|
||||||
@ -11,9 +11,10 @@
|
|||||||
|
|
||||||
<item name="brandPrimary">#FFD32D1F</item>
|
<item name="brandPrimary">#FFD32D1F</item>
|
||||||
<item name="brandSecondary">#FF8A1E15</item>
|
<item name="brandSecondary">#FF8A1E15</item>
|
||||||
<!-- ===== Background Colors ===== -->
|
|
||||||
<item name="backgroundPrimary">#FFFFFFFF</item> <!-- Light Cyan (Cyan 50) -->
|
<item name="backgroundPrimary">#FFFFFFFF</item> <!-- Light Cyan (Cyan 50) -->
|
||||||
<item name="backgroundSecondary">#FFFFFF</item> <!-- White -->
|
<item name="backgroundSecondary">#FFFFFF</item> <!-- White -->
|
||||||
|
<item name="android:fontFamily">monospace</item>
|
||||||
|
<item name="primaryButtonCornerRadius">@dimen/webid_button_corner_radius</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user