mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 09:49:25 +02:00
Move lockscreen tabs into the toolbar
This commit is contained in:
parent
11a47c5f30
commit
8e02eb3fb3
2 changed files with 104 additions and 100 deletions
|
@ -51,6 +51,7 @@ fun ScreenScaffold(
|
|||
backStack: List<BackStackItem>,
|
||||
snackbarHostState: SnackbarHostState?,
|
||||
content: @Composable (PaddingValues) -> Unit,
|
||||
extraBars: (@Composable () -> Unit)? = null,
|
||||
executeCommand: (UpdateStateCommand) -> Unit,
|
||||
showAuthenticationDialog: (() -> Unit)?
|
||||
) {
|
||||
|
@ -58,6 +59,7 @@ fun ScreenScaffold(
|
|||
|
||||
Scaffold(
|
||||
topBar = {
|
||||
Column {
|
||||
TopAppBar(
|
||||
title = {
|
||||
Column {
|
||||
|
@ -121,6 +123,9 @@ fun ScreenScaffold(
|
|||
modifier = Modifier,
|
||||
windowInsets = WindowInsets.statusBarsIgnoringVisibility
|
||||
)
|
||||
|
||||
extraBars?.invoke()
|
||||
}
|
||||
},
|
||||
bottomBar = {
|
||||
val backStackColors = ButtonDefaults.textButtonColors(
|
||||
|
|
|
@ -147,8 +147,7 @@ class LockActivity : AppCompatActivity(), ActivityViewModelHolder, U2fManager.De
|
|||
subtitle = subtitle,
|
||||
backStack = emptyList(),
|
||||
snackbarHostState = null,
|
||||
content = { padding ->
|
||||
Column (Modifier.fillMaxSize().padding(padding)) {
|
||||
extraBars = {
|
||||
TabRow(
|
||||
pager.currentPage,
|
||||
indicator = { tabPositions ->
|
||||
|
@ -190,10 +189,11 @@ class LockActivity : AppCompatActivity(), ActivityViewModelHolder, U2fManager.De
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
content = { padding ->
|
||||
HorizontalPager(
|
||||
pager,
|
||||
Modifier.weight(1.0F, fill = true),
|
||||
Modifier.fillMaxSize().padding(padding),
|
||||
pageContent = { index ->
|
||||
when (index) {
|
||||
0 -> AndroidFragment<LockReasonFragment>(Modifier.fillMaxSize())
|
||||
|
@ -202,7 +202,6 @@ class LockActivity : AppCompatActivity(), ActivityViewModelHolder, U2fManager.De
|
|||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
executeCommand = {},
|
||||
showAuthenticationDialog =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue