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:$compose_version"
|
||||||
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
|
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
|
||||||
debugImplementation "androidx.compose.ui:ui-tooling:$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
|
// Material Design 3
|
||||||
implementation "androidx.compose.material3:material3:1.0.0-alpha09"
|
implementation "androidx.compose.material3:material3:1.0.0-alpha10"
|
||||||
|
|
||||||
// Hilt and navigation
|
// Hilt and navigation
|
||||||
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
|
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
|
||||||
|
@ -58,9 +58,9 @@ fun AboutScreen(
|
|||||||
scrollBehavior = scrollBehavior
|
scrollBehavior = scrollBehavior
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
) {
|
) { padding ->
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
Modifier.padding(horizontal = 16.dp),
|
Modifier.padding(padding).padding(horizontal = 16.dp),
|
||||||
verticalArrangement = Arrangement.spacedBy(16.dp),
|
verticalArrangement = Arrangement.spacedBy(16.dp),
|
||||||
contentPadding = PaddingValues(vertical = 16.dp)
|
contentPadding = PaddingValues(vertical = 16.dp)
|
||||||
) {
|
) {
|
||||||
|
@ -53,8 +53,9 @@ fun MainScreen(
|
|||||||
.centerAlignedTopAppBarColors(containerColor = Color.Transparent)
|
.centerAlignedTopAppBarColors(containerColor = Color.Transparent)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
content = {
|
content = { padding ->
|
||||||
PortraitMainScreenContent(
|
PortraitMainScreenContent(
|
||||||
|
modifier = Modifier.padding(padding),
|
||||||
unitFrom = viewModel.unitFrom,
|
unitFrom = viewModel.unitFrom,
|
||||||
unitTo = viewModel.unitTo,
|
unitTo = viewModel.unitTo,
|
||||||
portrait = LocalConfiguration.current.orientation == Configuration.ORIENTATION_PORTRAIT,
|
portrait = LocalConfiguration.current.orientation == Configuration.ORIENTATION_PORTRAIT,
|
||||||
@ -72,6 +73,7 @@ fun MainScreen(
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun PortraitMainScreenContent(
|
private fun PortraitMainScreenContent(
|
||||||
|
modifier: Modifier,
|
||||||
unitFrom: AbstractUnit,
|
unitFrom: AbstractUnit,
|
||||||
unitTo: AbstractUnit,
|
unitTo: AbstractUnit,
|
||||||
portrait: Boolean = true,
|
portrait: Boolean = true,
|
||||||
@ -85,7 +87,7 @@ private fun PortraitMainScreenContent(
|
|||||||
) {
|
) {
|
||||||
if (portrait) {
|
if (portrait) {
|
||||||
Column(
|
Column(
|
||||||
Modifier
|
modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(8.dp),
|
.padding(8.dp),
|
||||||
verticalArrangement = Arrangement.spacedBy(24.dp)
|
verticalArrangement = Arrangement.spacedBy(24.dp)
|
||||||
@ -117,7 +119,7 @@ private fun PortraitMainScreenContent(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Row(
|
Row(
|
||||||
Modifier
|
modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(8.dp),
|
.padding(8.dp),
|
||||||
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
horizontalArrangement = Arrangement.spacedBy(8.dp)
|
||||||
|
@ -61,9 +61,9 @@ fun SettingsScreen(
|
|||||||
scrollBehavior = scrollBehavior
|
scrollBehavior = scrollBehavior
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
content = {
|
content = { padding ->
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
Modifier.fillMaxHeight()
|
Modifier.padding(padding).fillMaxHeight()
|
||||||
) {
|
) {
|
||||||
item {
|
item {
|
||||||
Column {
|
Column {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
compose_version = '1.2.0-alpha07'
|
compose_version = '1.2.0-alpha08'
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
@ -9,7 +9,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.1.3'
|
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'
|
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.38.1'
|
||||||
|
|
||||||
// Google services
|
// Google services
|
||||||
|
Loading…
x
Reference in New Issue
Block a user