Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [android-jetpack]

Android Jetpack is a Google's set of libraries, tools and architectural guidance to build Android apps and provides common infrastructure code.

android-jetpack
12 votes
1 answer
10k views

Rounded corner only at top of image AysncImage Coil

I'm using the new AysncImage loader for compose inside a Box. The Box itself has a RoundedCornerShape. I have also added a RoundedCornerShape for the AsyncImage with the following values Box( ...
2 votes
2 answers
464 views

How can I achieve before-after animation in Jetpack Compose?

I have used weight or changed width with infinite animation, but it is not the effect showed in the below gif. How can I achieve it in Jetpack Compose?
22 votes
3 answers
19k views

What is the Jetpack Compose equivalent of RecyclerView or ListView?

In Jetpack Compose, how can I display a large list of data while laying out only the visible items, instead of composing and laying out every item on the initial layout pass? This would be similar to ...
3 votes
0 answers
53 views

Lazy Column with Scrollable Gradient background in Jetpack Compose

I'm working on a Jetpack Compose app having a Scaffold layout. My layout includes a title, a tab bar, and a LazyColumn. I want to create a gradient background that scrolls with the LazyColumn content ...
1 vote
1 answer
42 views

First draggable item is not on top of other items in a Row while it's dragged on Jetpack Compose

I have a collection of five items, all of which are draggable. I want to achieve behavior in which the dragged item will overlap all the others. I tried changing the zIndex parameter but it didn't ...
0 votes
0 answers
20 views

Is there a way we can use same navController in two different navHost in android jetpack for type safe navigation

I am using a bottom navigation in android jetpack @Composable fun BottomNavigationBar() { val navController = rememberNavController() var navigationSelectedItem by remember { mutableStateOf(...
2 votes
1 answer
911 views

What is the difference between Jetpack and Jitpack in Android?

While reading and watching videos of the android I thought jitpack and jetpack are similar things and I was pretty much confused to see a similar word with a different meaning. But I wanted to get a ...
1 vote
1 answer
1k views

How can the top padding be removed from Android JetPack Compose ModalBottomSheetLayout?

I have tried for a few hours without success to remove the top padding from the Compose ModalBottomSheetLayout. I tried debugging through the internal material classes to trace where the padding is ...
7 votes
3 answers
3k views

My composable view doesn't recompose itself even though state changes

I am trying to develop sample chat app with jetpack compose and struggling with states. I have lazyColumn which contains messages. My problem is when user clicks the button, my "ChatList" ...
1 vote
2 answers
255 views

Does storing a reference to LazyListState in ViewModel cause memory leak?

I have a LazyColumn and I want to scroll to the top of the list after swipe to refresh. I use Compose's pull refresh for swipe refresh layout. I am storing lazyliststate in my viewModel to scroll to ...
0 votes
1 answer
80 views

Kotlin Multiplatform + Jetpack Navigation + Android Studio Koala 2024.1.1 Patch 1 issues

I've started moving one of my older project (Java) to the KMP setup, my goal was to just move around the structure to KMP and slowly import Kotlin code from the shared folder into the androidApp. I ...
53 votes
3 answers
40k views

What is the use of androidx.legacy:legacy-support-v4: dependency

I was implementing Android Room Database and in one of the tutorial I found the usage of androidx.legacy:legacy-support-v4:1.0.0 dependency. Can any one tell me use of this dependency.
1 vote
0 answers
32 views

How to keep the button over the other elements even if it is disabled in Jetpack Compose?

I have a screen where I display a list of items: Scaffold( content = { //List of items }, floatingActionButton = { Button( onClick = { if (...
0 votes
0 answers
15 views

Which resource qualifiers should I use for devices having similar screen sizes but showing views in different sizes?

I am working with views in xml in Android development, and I noticed that some devices with similar screen sizes (both in terms of DPI and pixels) show the UI of the app differently. For example, a ...
69 votes
5 answers
49k views

Android Jetpack compose gradient

Is it possible to draw a gradient over an image drawable using Jetpack Compose? fun HeroCover() { Column { val image = +imageResource(R.drawable.edge_of_tomorrow_poster) Container(...

15 30 50 per page
1
2 3 4 5
206