init
This commit is contained in:
@@ -18,6 +18,7 @@ import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.navigation.NavController
|
||||
import cc.n0th1ng.tripmoney.R.string
|
||||
import com.composables.icons.materialsymbols.outlined.R
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@@ -32,7 +33,7 @@ fun CustomNavigationDrawer(
|
||||
Text("Trip Money", modifier = Modifier.padding(16.dp))
|
||||
HorizontalDivider()
|
||||
NavigationDrawerItem(
|
||||
label = { Text(text = "Pick trip") },
|
||||
label = { Text(text = stringResource(string.pick_trip)) },
|
||||
selected = false,
|
||||
onClick = {
|
||||
navController.navigate(Screens.TRIP_PICKER)
|
||||
@@ -48,7 +49,7 @@ fun CustomNavigationDrawer(
|
||||
)
|
||||
})
|
||||
NavigationDrawerItem(
|
||||
label = { Text(text = "List of expenses") },
|
||||
label = { Text(text = stringResource(string.list_of_expenses)) },
|
||||
selected = false,
|
||||
onClick = {
|
||||
navController.navigate(Screens.LIST_EXPENSE)
|
||||
@@ -64,7 +65,7 @@ fun CustomNavigationDrawer(
|
||||
)
|
||||
})
|
||||
NavigationDrawerItem(
|
||||
label = { Text(text = "Statistics") },
|
||||
label = { Text(text = stringResource(string.statistics)) },
|
||||
selected = false,
|
||||
onClick = {
|
||||
navController.navigate(Screens.STATISTICS)
|
||||
@@ -80,7 +81,7 @@ fun CustomNavigationDrawer(
|
||||
)
|
||||
})
|
||||
NavigationDrawerItem(
|
||||
label = { Text(text = "Settings") },
|
||||
label = { Text(text = stringResource(string.settings)) },
|
||||
selected = false,
|
||||
onClick = {
|
||||
navController.navigate(Screens.SETTINGS)
|
||||
@@ -88,7 +89,7 @@ fun CustomNavigationDrawer(
|
||||
drawerState.close()
|
||||
}
|
||||
},
|
||||
icon = { Icon(Icons.Default.Settings, contentDescription = "settings") }
|
||||
icon = { Icon(Icons.Default.Settings, contentDescription = stringResource(string.settings)) }
|
||||
)
|
||||
}
|
||||
}) { content() }
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.navigation.NavHostController
|
||||
import cc.n0th1ng.tripmoney.R
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
@@ -31,7 +32,7 @@ fun TopBar(onClick: () -> Unit, title: String = "") {
|
||||
fun TopBarSettings(navController: NavHostController) {
|
||||
|
||||
TopAppBar(
|
||||
title = { Text("Settings") },
|
||||
title = { Text(stringResource(R.string.settings)) },
|
||||
navigationIcon = {
|
||||
IconButton(onClick = { navController.popBackStack() }) {
|
||||
Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "Back")
|
||||
|
||||
Reference in New Issue
Block a user