-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #489 from DimensionDev/feature/home_tab
add home tab support
- Loading branch information
Showing
15 changed files
with
1,004 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
app/src/main/java/dev/dimension/flare/ui/component/FlareTopAppBar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package dev.dimension.flare.ui.component | ||
|
||
import androidx.compose.foundation.layout.RowScope | ||
import androidx.compose.foundation.layout.WindowInsets | ||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.TopAppBarColors | ||
import androidx.compose.material3.TopAppBarDefaults | ||
import androidx.compose.material3.TopAppBarScrollBehavior | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.Dp | ||
|
||
@ExperimentalMaterial3Api | ||
@Composable | ||
fun FlareTopAppBar( | ||
title: @Composable () -> Unit, | ||
modifier: Modifier = Modifier, | ||
navigationIcon: @Composable () -> Unit = {}, | ||
actions: @Composable RowScope.() -> Unit = {}, | ||
expandedHeight: Dp = TopAppBarDefaults.TopAppBarExpandedHeight, | ||
windowInsets: WindowInsets = TopAppBarDefaults.windowInsets, | ||
colors: TopAppBarColors = | ||
TopAppBarDefaults.topAppBarColors( | ||
containerColor = MaterialTheme.colorScheme.surface, | ||
scrolledContainerColor = MaterialTheme.colorScheme.surface, | ||
), | ||
scrollBehavior: TopAppBarScrollBehavior? = null, | ||
) { | ||
androidx.compose.material3.TopAppBar( | ||
title = title, | ||
modifier = modifier, | ||
navigationIcon = navigationIcon, | ||
actions = actions, | ||
expandedHeight = expandedHeight, | ||
windowInsets = windowInsets, | ||
colors = colors, | ||
scrollBehavior = scrollBehavior, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.