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 is the next generation of Android components, bringing together the benefits of the Support Library -- backwards compatibility and immediate updates -- to a larger set of components, making it quick and easy to build robust, high quality apps.

It manages activities like background tasks, navigation, and lifecycle management, so you can eliminate boilerplate code and focus on what makes your app great.

It is designed to work well with Kotlin, saving you even more code with Android KTX. The new Android Jetpack components released today include WorkManager, Paging, Navigation, and Slices.

Useful Links

2879 questions
1
vote
0 answers

How Paging3's cachedIn(viewModelScope) works in android

Hello I am applying Paging3 to my project. I came across the cachedIn() operator while looking at the Paging3 code, and I have one question. Android official documentation says that cachedIn() caches loaded data using CoroutineScope. I used…
Yeeun Lee
  • 23
  • 6
1
vote
0 answers

AnimatedVisibility doing weried behaviour when using Spacebetween in column

I want to use verticalArrangement = Arrangement.SpaceBetween in Column to align view top and bottom. I did this before without any problem. Now I added AnimatedVisibility to look good animation when my condition true. But It overlapping the view. I…
Kotlin Learner
  • 3,995
  • 6
  • 47
  • 127
1
vote
1 answer

Getting error on updating 1.2.1 compose version on surface in jetpack compose

I am using compose version 1.1.1 in my project. I am using LocalRippleTheme like this import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.material.ExperimentalMaterialApi import…
Kotlin Learner
  • 3,995
  • 6
  • 47
  • 127
1
vote
0 answers

adjustResize not working in full screen mode in Jetpack Compose

I used true in theme so adjustResize didn't work out. Can anyone has solution for it. Note: Code is in jetpack compose
1
vote
3 answers

webView inside of the bottom sheet of the BottomSheetScaffold is not scrollable

I have list of groceries in the scaffold and when one of the items are selected, I have to open a modal sheet containing a webView. However, whatever I do, I can not prevent modal sheet to consume all the gestures itself. What I meant is, I can not…
Subfly
  • 492
  • 2
  • 13
1
vote
1 answer

Jetpack compose custom shape with pie effect

I want to make a shape filling the circle according to given percentage. Since i suck at math I'm unable to achieve this with path Api of jetpack compose. My custom class is looking like this: class ProgressPie(val progress: Float) : Shape…
David L.
  • 25
  • 1
  • 6
1
vote
0 answers

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 being set and can't for the life of me work it…
1
vote
0 answers

androidTest folder not found in my Jetpack compose Project

anyone know about androidTest in jetpack compose?
1
vote
3 answers

How to start new activity in jetpack compose

I want to start new activity in jetpack compose. So I want to know what is the idiomatic way of doing in jetpack compose. Is any side effect api need to be use or not when…
1
vote
0 answers

CameraX captured image size and PreviewView size are not the same for some device

I am trying to use CameraX for image capture and capture preview. I found captured image and preview image different for google pixel 5a, but for Samsung A72 device captured image and preview image are same. For pixel phone captured image is left…
1
vote
1 answer

Not able to see horizontal page indicator

I started learning jetpack compose and am currently stuck at the moment where I am not able to see the horizontal page indicator and not able to swipe to the next page too. Only the screen at startDestination is visible. I have referred this from…
1
vote
0 answers

@Composable invocations can only happen from the context of a @Composable function in LaunchEffect

Hey guys I am working in ripple effect in jetpack compose. I create one function for ripple effect and use this function to Material button. When I call the Material button inside LaunchEffect it's giving me error. @Composable invocations can only…
1
vote
0 answers

prevent button click from being recognized on underlying composable

I am using Jetpack Compose and have a composable with a video player. When you tap the screen I have a listener that pauses the video. On the top of the screen I have a top AppBar with an icon button. When I tap the icon button the onClick fires…
LilMoke
  • 3,176
  • 7
  • 48
  • 88
1
vote
2 answers

How to write a text on the image with coil in Jetpack Compose?

How can we write a text on the image with coil in Jetpack Compose? For example, I want to write the IMDB score of the movie image that coil is showing in Jetpack Compose. and maybe with a yellow background. is it possible? thanks for help just for…
1
vote
1 answer

How to recompose without onClick?

Why for recomposing, we must use an event like onClick from a Button? for example, my code is: if (movieSearchinfo.movieorserie == "serie") { val serie1 = remember { mutableStateOf(false) } if (serie1.value == true) { …