diff --git a/app/build.gradle b/app/build.gradle index 1fe0962..4a504d5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -57,6 +57,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.compose.material3:material3:1.4.0' + implementation 'androidx.compose.foundation:foundation-layout:1.9.4' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' diff --git a/app/src/main/java/de/webidsolutions/metaplugindemo/scenes/MetaPluginDemoScene.kt b/app/src/main/java/de/webidsolutions/metaplugindemo/scenes/MetaPluginDemoScene.kt index 2dc0b03..bdc113f 100644 --- a/app/src/main/java/de/webidsolutions/metaplugindemo/scenes/MetaPluginDemoScene.kt +++ b/app/src/main/java/de/webidsolutions/metaplugindemo/scenes/MetaPluginDemoScene.kt @@ -1,5 +1,7 @@ package de.webidsolutions.metaplugindemo.scenes +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -62,12 +64,13 @@ fun MetaPluginDemoScreen( ) { Text( text = stringResource(R.string.choose_plugins), - style = MaterialTheme.typography.bodyLarge + style = MaterialTheme.typography.headlineSmall, + modifier = Modifier.padding(start = 10.dp) ) Spacer(modifier = Modifier.height(10.dp)) - Column(modifier = Modifier.padding(start = 10.dp)) { + Column { CheckboxWithLabel( checked = useAutoIdent, onCheckedChange = { useAutoIdent = it }, @@ -97,18 +100,17 @@ fun MetaPluginDemoScreen( Text( text = stringResource(R.string.choose_theming), - style = MaterialTheme.typography.bodyLarge, + style = MaterialTheme.typography.headlineSmall, + modifier = Modifier.padding(start = 10.dp) ) Spacer(modifier = Modifier.height(10.dp)) - Column ( - modifier = Modifier.padding(start = 10.dp), - ) { + Column { CheckboxWithLabel( checked = themingChoice == ThemingChoice.COMPOSE, onCheckedChange = { themingChoice = ThemingChoice.COMPOSE }, - label = "Code-Theming" + label = "Compose-Theming" ) CheckboxWithLabel( @@ -122,18 +124,17 @@ fun MetaPluginDemoScreen( Text( text = stringResource(R.string.log_headline), - style = MaterialTheme.typography.bodyLarge, + style = MaterialTheme.typography.headlineSmall, + modifier = Modifier.padding(start = 10.dp) ) Spacer(modifier = Modifier.height(10.dp)) - Surface( + Box( modifier = Modifier .weight(1f) .fillMaxWidth() - .padding(horizontal = 10.dp), - color = MaterialTheme.colorScheme.surfaceVariant, - shape = MaterialTheme.shapes.small + .padding(horizontal = 10.dp) ) { val scrollState = rememberScrollState() @@ -141,40 +142,44 @@ fun MetaPluginDemoScreen( scrollState.animateScrollTo(scrollState.maxValue) } - Text( - text = logText.ifEmpty { stringResource(R.string.log_placeholder) }, - modifier = Modifier - .fillMaxSize() - .verticalScroll(scrollState) - .padding(16.dp), - style = MaterialTheme.typography.bodyMedium - ) - } - - Spacer(modifier = Modifier.height(10.dp)) - - Button( - onClick = { - onStartClicked( - useAutoIdent, - usePayOnServer, - useEidOnServer, - useVideo, - themingChoice + Surface( + modifier = Modifier.fillMaxSize(), + shape = MaterialTheme.shapes.small + ) { + Text( + text = logText.ifEmpty { stringResource(R.string.log_placeholder) }, + modifier = Modifier + .fillMaxSize() + .verticalScroll(scrollState) + .padding(16.dp) + .padding(bottom = 80.dp), + style = MaterialTheme.typography.bodyMedium ) - }, - modifier = Modifier - .fillMaxWidth() - .height(60.dp) - .padding(horizontal = 10.dp), - colors = ButtonDefaults.buttonColors( - containerColor = Color(0xFF05B1FB) - ) - ) { - Text( - text = stringResource(R.string.start_button), - color = Color.White - ) + } + + Button( + onClick = { + onStartClicked( + useAutoIdent, + usePayOnServer, + useEidOnServer, + useVideo, + themingChoice + ) + }, + modifier = Modifier + .align(Alignment.BottomCenter) + .fillMaxWidth() + .height(60.dp), + colors = ButtonDefaults.buttonColors( + containerColor = Color(0xFF05B1FB) + ) + ) { + Text( + text = stringResource(R.string.start_button), + color = Color.White + ) + } } } } diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 6d97809..14db9e9 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -9,5 +9,5 @@ Core SDK erfolgreich erstellt Validiere Vorgangsnummer… Fehler: Die Vorgangsnummer (Action-ID) wurde in der Datei „MainActivity.kt“ nicht auf eine 9-stellige Zahlenfolge gesetzt. - Designauswahl + Designauswahl: \ No newline at end of file diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index 71bedef..fcb901b 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -3,47 +3,36 @@