diff --git a/app/src/main/java/be/scri/App.kt b/app/src/main/java/be/scri/App.kt index 92bf0e4e..96ff7854 100644 --- a/app/src/main/java/be/scri/App.kt +++ b/app/src/main/java/be/scri/App.kt @@ -22,7 +22,6 @@ package be.scri import android.annotation.SuppressLint import android.content.Context import androidx.activity.compose.BackHandler -import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -34,7 +33,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Modifier -import androidx.compose.ui.res.colorResource import androidx.compose.ui.unit.dp import androidx.navigation.NavHostController import androidx.navigation.compose.NavHost @@ -86,7 +84,7 @@ fun ScribeApp( }, pagerState = pagerState, modifier = - Modifier + Modifier, ) }, modifier = modifier.fillMaxSize(), diff --git a/app/src/main/java/be/scri/activities/MainActivity.kt b/app/src/main/java/be/scri/activities/MainActivity.kt index 95536ca8..20bd937c 100644 --- a/app/src/main/java/be/scri/activities/MainActivity.kt +++ b/app/src/main/java/be/scri/activities/MainActivity.kt @@ -99,7 +99,7 @@ class MainActivity : ComponentActivity() { }, context = context, navController = navController, - modifier = Modifier.navigationBarsPadding() + modifier = Modifier.navigationBarsPadding(), ) } } diff --git a/app/src/main/java/be/scri/ui/common/bottombar/ScribeBottomBar.kt b/app/src/main/java/be/scri/ui/common/bottombar/ScribeBottomBar.kt index 0df1fd48..84694056 100644 --- a/app/src/main/java/be/scri/ui/common/bottombar/ScribeBottomBar.kt +++ b/app/src/main/java/be/scri/ui/common/bottombar/ScribeBottomBar.kt @@ -1,37 +1,20 @@ package be.scri.ui.common.bottombar -import android.util.Log -import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.WindowInsets -import androidx.compose.foundation.layout.asPaddingValues -import androidx.compose.foundation.layout.consumeWindowInsets -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.navigationBars -import androidx.compose.foundation.layout.offset -import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.pager.PagerState -import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.BottomNavigation import androidx.compose.material.BottomNavigationItem import androidx.compose.material.Icon -import androidx.compose.material3.BottomAppBar import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.NavigationBar import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.google.android.material.bottomnavigation.BottomNavigationItemView @Composable fun ScribeBottomBar( @@ -39,12 +22,12 @@ fun ScribeBottomBar( pagerState: PagerState, modifier: Modifier = Modifier, ) { - Column ( - modifier = modifier + Column( + modifier = modifier, ) { BottomNavigation( backgroundColor = MaterialTheme.colorScheme.surface, - modifier = Modifier + modifier = Modifier, ) { bottomBarScreens.forEachIndexed { index, item -> val isSelected = pagerState.currentPage == index @@ -76,32 +59,32 @@ fun ScribeBottomBar( icon = { androidx.compose.material3.Icon( painter = - painterResource( - id = item.icon, - ), + painterResource( + id = item.icon, + ), tint = color, contentDescription = "Keyboard", modifier = - Modifier - .clip(MaterialTheme.shapes.medium) - .size(iconSize), + Modifier + .clip(MaterialTheme.shapes.medium) + .size(iconSize), ) }, label = { Text( text = item.label, style = - MaterialTheme.typography.labelMedium.copy( - fontSize = textSize, - fontWeight = if (isSelected) FontWeight.ExtraBold else FontWeight.W600, - letterSpacing = (0).sp, - color = color - ), + MaterialTheme.typography.labelMedium.copy( + fontSize = textSize, + fontWeight = if (isSelected) FontWeight.ExtraBold else FontWeight.W600, + letterSpacing = (0).sp, + color = color, + ), ) }, alwaysShowLabel = true, selectedContentColor = MaterialTheme.colorScheme.secondary, - unselectedContentColor = MaterialTheme.colorScheme.onSurface + unselectedContentColor = MaterialTheme.colorScheme.onSurface, ) } } diff --git a/app/src/main/java/be/scri/ui/common/components/ItemCardContainer.kt b/app/src/main/java/be/scri/ui/common/components/ItemCardContainer.kt index 57236abe..667d45d0 100644 --- a/app/src/main/java/be/scri/ui/common/components/ItemCardContainer.kt +++ b/app/src/main/java/be/scri/ui/common/components/ItemCardContainer.kt @@ -30,7 +30,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp -import be.scri.R import be.scri.ui.models.ScribeItem import be.scri.ui.models.ScribeItemList diff --git a/app/src/main/java/be/scri/ui/common/components/SwitchableItemComp.kt b/app/src/main/java/be/scri/ui/common/components/SwitchableItemComp.kt index 44dfbf0d..83e9663d 100644 --- a/app/src/main/java/be/scri/ui/common/components/SwitchableItemComp.kt +++ b/app/src/main/java/be/scri/ui/common/components/SwitchableItemComp.kt @@ -72,32 +72,32 @@ fun SwitchableItemComp( checked = isChecked, onCheckedChange = onCheckedChange, modifier = - Modifier - .width(51.dp) - .height(31.dp), + Modifier + .width(51.dp) + .height(31.dp), thumbContent = { Box( modifier = - Modifier - .size(27.dp) - .background( - if (isChecked) { - checkedThumbColor - } else { - uncheckedThumbColor - }, - shape = CircleShape, - ), + Modifier + .size(27.dp) + .background( + if (isChecked) { + checkedThumbColor + } else { + uncheckedThumbColor + }, + shape = CircleShape, + ), ) }, colors = - SwitchDefaults.colors( - checkedThumbColor = checkedThumbColor, - uncheckedThumbColor = uncheckedThumbColor, - checkedTrackColor = checkedTrackColor, - uncheckedTrackColor = uncheckedTrackColor, - uncheckedBorderColor = Color.Transparent, - ), + SwitchDefaults.colors( + checkedThumbColor = checkedThumbColor, + uncheckedThumbColor = uncheckedThumbColor, + checkedTrackColor = checkedTrackColor, + uncheckedTrackColor = uncheckedTrackColor, + uncheckedBorderColor = Color.Transparent, + ), ) } Text( diff --git a/app/src/main/java/be/scri/ui/screens/InstallationScreen.kt b/app/src/main/java/be/scri/ui/screens/InstallationScreen.kt index b935a698..b54b31a7 100644 --- a/app/src/main/java/be/scri/ui/screens/InstallationScreen.kt +++ b/app/src/main/java/be/scri/ui/screens/InstallationScreen.kt @@ -30,6 +30,7 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height @@ -90,7 +91,7 @@ fun InstallationScreen( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, ) { - Spacer(modifier = Modifier.height(54.dp)) + Spacer(modifier = Modifier.fillMaxHeight(0.4f)) Image( painter = painterResource(id = R.drawable.scribe_logo),