Questions tagged [android-jetpack-compose-scaffold]
38 questions
1
vote
1 answer
How to pass events to Composables?
I have two composables like this:
@Composable
fun Composable1(viewModel: MyViewModel) {
LaunchedEffect(Unit) {
viewModel.eventsFlow.collect { event ->
if(event is ShowSnackbar) {
// Send this event to…

Arpit Shukla
- 9,612
- 1
- 14
- 40
1
vote
2 answers
How can Navigation Drawer be opened with a drag when a list item is draggable in compose?
So I am rewriting an app's UI using Jetpack Compose. I have implemented a Navigation Drawer using the regular Scaffold function. Out of the box this provides two ways of opening the drawer: either press the navigationIcon or drag towards End of…

Jonas Kalderstam
- 1,136
- 12
- 27
0
votes
0 answers
How to correctly use BottomBar (NavigationBar) for top level destination screens?
So I had such UI structure at app top level composable (Scaffold to add bottom bar)
Scaffold(
contentWindowInsets = WindowInsets(0, 0, 0, 0),
bottomBar = {
if (appState.shouldShowBottomBarAndDrawer) {
AppBottomBar(
…

user924
- 8,146
- 7
- 57
- 139
0
votes
1 answer
How to employ BackdropScaffoldState.offset correctly to offset front contentlayer of compose BackdropScaffold
My current android applications main screen contains a androidx.compose.material.BackdropScaffold. The backdrop looks great and functions exactly as it says on the tin.
however I have an issue with the frontLayerContent which contains a list of…

Hector
- 4,016
- 21
- 112
- 211
0
votes
3 answers
Why BottomNavigation show in the next page in Jetpack Compose?
I want to do navigation with Scaffold and BottomNavigation in Jetpack Compose. They are in the MainPage. But when I click the content in the MainPage and navigate to DetailPage, the BottomNavigation also exist, like the image:
How can I hide the…

Li Zhenxin
- 163
- 1
- 9
0
votes
1 answer
How to render Activity/Fragment Activity within a Box [Jetpack Compose]
I am converting my Android mobile app to use Jetpack Compose.
At the moment I am starting the activity as an Intent and it works, but I lost the navigation if I do this way:
Button(onClick = {
val destination =…

Paulo Martins
- 21
- 3
0
votes
1 answer
How to make a Jetpack compose element appear on top of the keyboard in android?
Making a button stick to the bottom of the screen and to the keyboard when it pops up was pretty straightforward in XML, we could do something like this

Anudeep Ananth
- 955
- 1
- 8
- 30
0
votes
2 answers
How to save expandable card composable state and scrolling position in jetpack compose
I'm using custom expandable card as,
@Composable
fun ExpandableCardComposable(
isExpandable: Boolean = false,
topContent: @Composable () -> Unit,
buttomContent: @Composable () -> Unit
) {
val transactionState = remember {
…

Bpn
- 463
- 1
- 4
- 11