@@ -22,10 +22,11 @@ import androidx.activity.compose.LocalOnBackPressedDispatcherOwner
2222import androidx.compose.foundation.layout.PaddingValues
2323import androidx.compose.foundation.layout.RowScope
2424import androidx.compose.material.icons.Icons
25- import androidx.compose.material.icons.filled.ArrowBack
25+ import androidx.compose.material.icons.automirrored. filled.ArrowBack
2626import androidx.compose.material3.ExperimentalMaterial3Api
27+ import androidx.compose.material3.FilledIconButton
2728import androidx.compose.material3.Icon
28- import androidx.compose.material3.IconButton
29+ import androidx.compose.material3.IconButtonDefaults
2930import androidx.compose.material3.MaterialTheme
3031import androidx.compose.material3.Scaffold
3132import androidx.compose.material3.Text
@@ -53,35 +54,39 @@ fun ViewWithActionBar(
5354 topBar = {
5455 TopAppBar (
5556 title = {
56- Text (text = title, style = MaterialTheme .typography.titleMedium )
57+ Text (text = title, style = MaterialTheme .typography.titleLarge )
5758 },
5859 navigationIcon = {
5960 if (showBackButton) {
6061 val backDispatcher =
6162 LocalOnBackPressedDispatcherOwner .current?.onBackPressedDispatcher
62- IconButton (
63+ FilledIconButton (
6364 onClick = {
6465 onBackAction.invoke()
6566 backDispatcher?.onBackPressed()
66- }
67+ },
68+ colors = IconButtonDefaults .filledIconButtonColors(
69+ containerColor = MaterialTheme .colorScheme.surfaceContainerHighest
70+ )
6771 ) {
6872 Icon (
69- imageVector = Icons .Filled .ArrowBack ,
73+ imageVector = Icons .AutoMirrored . Filled .ArrowBack ,
7074 contentDescription = stringResource(id = R .string.gesture_press_back),
7175 )
7276 }
7377 }
7478 },
7579 actions = actions,
7680 colors = TopAppBarDefaults .topAppBarColors(
77- containerColor = MaterialTheme .colorScheme.background
81+ containerColor = MaterialTheme .colorScheme.surface,
82+ scrolledContainerColor = MaterialTheme .colorScheme.surfaceContainer
7883 )
7984 )
8085 },
8186 floatingActionButton = floatingActionButton,
8287 content = content,
8388 bottomBar = bottomBar,
84- containerColor = MaterialTheme .colorScheme.background ,
85- contentColor = MaterialTheme .colorScheme.onBackground ,
89+ containerColor = MaterialTheme .colorScheme.surface ,
90+ contentColor = MaterialTheme .colorScheme.onSurface ,
8691 )
8792}
0 commit comments