mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
Dependencies bump
Now using PaddingValue from Scaffold
This commit is contained in:
parent
1df13a9023
commit
c1eb30e837
@ -109,10 +109,10 @@ dependencies {
|
||||
implementation "androidx.compose.ui:ui:$compose_version"
|
||||
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
|
||||
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
|
||||
implementation 'androidx.navigation:navigation-compose:2.5.0-alpha04'
|
||||
implementation 'androidx.navigation:navigation-compose:2.5.0-beta01'
|
||||
|
||||
// Material Design 3
|
||||
implementation "androidx.compose.material3:material3:1.0.0-alpha09"
|
||||
implementation "androidx.compose.material3:material3:1.0.0-alpha10"
|
||||
|
||||
// Hilt and navigation
|
||||
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
|
||||
|
@ -58,9 +58,9 @@ fun AboutScreen(
|
||||
scrollBehavior = scrollBehavior
|
||||
)
|
||||
},
|
||||
) {
|
||||
) { padding ->
|
||||
LazyColumn(
|
||||
Modifier.padding(horizontal = 16.dp),
|
||||
Modifier.padding(padding).padding(horizontal = 16.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(16.dp),
|
||||
contentPadding = PaddingValues(vertical = 16.dp)
|
||||
) {
|
||||
|
@ -53,8 +53,9 @@ fun MainScreen(
|
||||
.centerAlignedTopAppBarColors(containerColor = Color.Transparent)
|
||||
)
|
||||
},
|
||||
content = {
|
||||
content = { padding ->
|
||||
PortraitMainScreenContent(
|
||||
modifier = Modifier.padding(padding),
|
||||
unitFrom = viewModel.unitFrom,
|
||||
unitTo = viewModel.unitTo,
|
||||
portrait = LocalConfiguration.current.orientation == Configuration.ORIENTATION_PORTRAIT,
|
||||
@ -72,6 +73,7 @@ fun MainScreen(
|
||||
|
||||
@Composable
|
||||
private fun PortraitMainScreenContent(
|
||||
modifier: Modifier,
|
||||
unitFrom: AbstractUnit,
|
||||
unitTo: AbstractUnit,
|
||||
portrait: Boolean = true,
|
||||
@ -85,7 +87,7 @@ private fun PortraitMainScreenContent(
|
||||
) {
|
||||
if (portrait) {
|
||||
Column(
|
||||
Modifier
|
||||
modifier
|
||||
.fillMaxSize()
|
||||
.padding(8.dp),
|
||||
verticalArrangement = Arrangement.spacedBy(24.dp)
|
||||
@ -117,7 +119,7 @@ private fun PortraitMainScreenContent(
|
||||
}
|
||||
} else {
|
||||
Row(
|
||||
Modifier
|
||||
modifier
|
||||
.fillMaxSize()
|
||||
.padding(8.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
||||
|
@ -61,9 +61,9 @@ fun SettingsScreen(
|
||||
scrollBehavior = scrollBehavior
|
||||
)
|
||||
},
|
||||
content = {
|
||||
content = { padding ->
|
||||
LazyColumn(
|
||||
Modifier.fillMaxHeight()
|
||||
Modifier.padding(padding).fillMaxHeight()
|
||||
) {
|
||||
item {
|
||||
Column {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
buildscript {
|
||||
ext {
|
||||
compose_version = '1.2.0-alpha07'
|
||||
compose_version = '1.2.0-alpha08'
|
||||
}
|
||||
repositories {
|
||||
google()
|
||||
@ -9,7 +9,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20"
|
||||
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.38.1'
|
||||
|
||||
// Google services
|
||||
|
Loading…
x
Reference in New Issue
Block a user