android-jetpack-compose Questions

2

Solved

I have the following Composable @Composable fun ClickableBar(text: String, action: () -> Unit) { Row( modifier = Modifier .height(40.dp) .background(color = AppPrimaryGreen) .fillMaxWidth()...
Kendrakendrah asked 25/8, 2024 at 6:13

7

Solved

In the process of migrating my app to Jetpack compose, I've come to a part of my app where a TextField needs autocompletion functionality. However, as of version 1.0.0-alpha05, I couldn't find any ...
Sociality asked 18/10, 2020 at 23:35

3

I'm trying to create a @Preview function for a ModalBottomSheet in Jetpack Compose, but I'm only seeing a white screen. Here's my SomeModalBottomSheet composable: @OptIn(ExperimentalMaterial3Api::c...

2

Solved

I have the following composable OutlinedTextField @Composable fun EmailEntry( shouldShowLabel: Boolean = false, onEmailEntered: (emailText: String) -> Unit) { var emailText by rememberSaveab...
Claudelle asked 22/7, 2022 at 16:3

4

Solved

here's my situation: I have to show in my app a detail of a record I receive from API. Inside this view, I may or may not need to show some data coming from another viewmodel, based on a field. Her...
Lodicule asked 15/4, 2022 at 10:49

2

Solved

I have a fullscreen LazyColumn: LazyColumn( modifier = Modifier .fillMaxSize() ) { item { MyHeader() } stickyHeader { Row( modifier = Modifier .background(Color.Red) .fillMaxWidth() .hei...
Stanleystanly asked 1/10, 2023 at 10:35

3

Solved

how to use hilt with ksp instead of kapt seems like i can't figure it out please let me know what dependencies should i add and how should i add them dependencies i added: //hilt val hiltVersion =...
Edi asked 12/4, 2024 at 11:42

2

Solved

Box( modifier = Modifier.size(100.dp), contentAlignment = Alignment.Center ) { val pagerState = rememberPagerState() val items = listOf("A", "B", "C") androidx....
Bathe asked 16/2, 2023 at 6:24

4

I am making a layout where a column contains up to 5 rows. Each row has three columns and I would like to have the width of the first column of each row be completely equal. The first column in eac...
Pieria asked 28/1, 2022 at 18:21

3

I'm using the new Material 3 NavigationBar and NavigationBarItem components, I want the NavigationBar to be thinner, because the default one is too large. I want one similar to the one Gmail or Dri...
Ranaerancagua asked 14/11, 2021 at 17:47

2

Solved

I am working on a custom layout that presents a day timeline in Jetpack Compose using Layout composable. The result looks like Google's Calenar and code is similar to the one described in that grea...
Lynden asked 11/12, 2021 at 15:49

3

In Jetpack Compose Animation, for tween AnimationSpec, we can have a delay val translationY by transition.animateFloat( transitionSpec = { tween( delayMillis = 1000, // Delay here durationMill...
Marsupium asked 9/3, 2022 at 7:50

1

When opening a Dialog in Jetpack Compose, Talkback will always read the application label, before reading the Dialog title. I have already tried setting the activity lable in the manifest to someth...
Solberg asked 12/12, 2022 at 22:31

2

Solved

In the making of a dropdown menu in compose, I ran across a problem where my DropdownMenu will always fillMaxWidth as given in the modifier. my goal is to add padding so it will match the content o...
Almsgiver asked 12/11, 2021 at 8:23

3

Solved

How to make the parent layout - Box wrap its content in Jetpack compose? The current implementation below fills the entire screen, I only want the Box to wrap around its child - Switch. How do I de...

4

Solved

I have a Compose activity, where there's a top app bar, and some TextFields towards the bottom of the screen. When I focus on one of the TextFields and the keyboard is invoked, I want the text fiel...
Trisect asked 9/12, 2022 at 11:17

8

Solved

I am trying to apply Jetpack Compose navigation into my application. My Screens: Login/Register screens and Bottom navbar screens(call, chat, settings). I already found out that the best way to do ...

4

Solved

I have a Box in my app with a bunch of children: Box(modifier = Modifier.fillMaxSize()) { Text("a") Text("b") } I want the text to appear aligned to the top at 20% distance f...
Foret asked 23/4, 2022 at 9:35

6

A blank grey circle of PullToRefreshContainer is always displaying even first time or after refreshing. Here is my code val pullRefreshState = rememberPullToRefreshState() Box( modifier = Modifie...
Commonage asked 31/3, 2024 at 0:43

4

Solved

How does one properly rotate text in jetpack compose and get it to do a correct layout? When I use the rotate modifier on a Text object the text is rotated but the size taken up in the layout seems...
Shameful asked 21/11, 2021 at 18:21

6

Solved

I have an app that makes heavy use of experimental features for Jetpack Compose so I have to declare a bunch of annotations on the composables. Since these annotations require callers to also decla...
Noriega asked 3/12, 2021 at 14:51

2

Solved

I want to change state of ModalBottomSheet from Jetpack Compose in ViewModel. Here what I do, I have a ViewModel, something like this: class MyViewModel() { @ExperimentalMaterialApi val bottomShe...
Trug asked 28/12, 2021 at 10:56

5

I have a LazyColumn holding some Items. I listen a Flow from Room and everything works great when reverseLayout = true. When new Item get inserted into the database, the LazyColumn scrolls to the b...
Homeless asked 4/5, 2022 at 10:15

5

Say that, I'm building a custom compose layout and populating that list as below val list = remember { dataList.toMutableStateList()} MyCustomLayout{ list.forEach { item -> key(item){ listI...
Psychasthenia asked 5/4, 2021 at 9:40

1

I have an android (compose) projet with a single libs.versions.toml for versions catalog. In this .toml, I declare a compose BOM and some librairies as follow: [versions] ksp = "1.9.10-1.0.13...
Succor asked 29/10, 2023 at 19:53

© 2022 - 2025 — McMap. All rights reserved.