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
1 answer

Are compose.testTags modifiers compiled at buildtime for non-test builds or are they stripped?

I am trying to convert espresso tests to support compose. Seems a bit awkward adding test tags in product code unless it gets removed. e.g. OutlinedTextField ( modifier = Modifier.testTag("myField"),
1
vote
1 answer

Android - Custom runner's newApplication called but HiltTestApplication not being used?

I'm working on app with Hilt and trying to make some instrumentation tests on it. But my tests are crashing with: java.lang.IllegalStateException: Hilt test, x.B, cannot use a @HiltAndroidApp application but found <...MyApplication>. To fix,…
VizGhar
  • 3,036
  • 1
  • 25
  • 38
1
vote
1 answer

Composable transparency

Is there any way to make composable transparent the same way Image can be done with alpha example: Image( painter = painterResource(id = R.drawable.flower), contentDescription = null, alpha = 0.2F) I am aware of making background and…
1
vote
1 answer

Prepopulate Room database build success and no error tip ,But the prepopulate data not add to the database

Room 2.5.0-alpha02 I need the prepopulate one table data to the database , So I make a .db file only have one table which I need inflate the prepopulate data , The Android developer document told 2.4.0 + Room have auto migrate ,and So I not write…
LuoBo
  • 92
  • 7
1
vote
0 answers

how to fix "Java source root points to a non-existent location: " error in Android Studio

I'm trying to get familiar with jetpack compose. I cloned the Android Developer Codelab, and I'm practicing the Navigation Codelab. I haven't even done much in the codelab, but when i run the code I get an error; I don't know the cause, or what is…
1
vote
0 answers

How to do Jetpack Compose Navigation for dynamic feature modules?

Working on Jetpack Compose Navigation with multi module application. Using Kotlin DSL. We have dynamic feature modules DFM1, DFM2, DFM3. How to setup navigation graph and navigate between dynamic feature modules.
1
vote
1 answer

How to pass a composable function without a lamda?

Scaffold( bottomBar = { SootheBottomNavigation() }, content = { padding -> HomeScreen(Modifier.padding(padding)) } ) @Composable fun HomeScreen(modifier: Modifier = Modifier) { …
sjso
  • 277
  • 2
  • 11
1
vote
1 answer

Vertical scroll on Canvas (Jetpack Compose)

I have a problem. When I added the vertical scroll modifier to my canvas, it didn't work. I don't understand why. Code: Canvas(modifier = Modifier .fillMaxSize() .verticalScroll(rememberScrollState())) { } The content just…
1
vote
1 answer

Ripple effect not working correctly in jetpack compose

I am working on ripple effect in jetpack compose. I provide my color and after clicking on view it show some time after that different type of color showing like dark grey on press state. binding.itemComposable.setContent { …
Kotlin Learner
  • 3,995
  • 6
  • 47
  • 127
1
vote
1 answer

Android CircularProgressIndicator takes up full screen with compose

I have a simple compose function i want to put a circularprogessindicator in the middle of the screen at 80dp x 80dp, its aligned to the top and takes up the full width. @Composable fun MyCircularProgress() { CircularProgressIndicator( …
Brian
  • 4,328
  • 13
  • 58
  • 103
1
vote
1 answer

is it in Jetpack Compose exist possibility to add background image to Column who fill all Column similar like fill color?

I want to add background image but if i add only Image(){} inside Box ,is not resizable background image to content and contain more space that i want . I found this but not work for me,…
1
vote
1 answer

How to sort data on the bases of Priority HIGH,Medium and Low in jetpack compose

sealed class Priority{ object High : Priority() object Medium : Priority() object Low : Priority() } I did not be able to sort the data in lazy column on the basis of high,medium and low
1
vote
1 answer

How can I get Scroll percentage of LazyColumn?

I am trying to get the scroll percentage of lazy columns to scroll like 25%, 50%, 100%. After the analysis, I could not find any method to get it.
Asharali V U
  • 973
  • 9
  • 25
1
vote
3 answers

Jetpack Compose: Constraint Layout Vertical Chain Constraints Issue

I'm trying to build something similar to the following using Jetpack Compose ConstraintLayout. I want to understand how can I create a vertical chain with respect to the Image. When I try to use the createVerticalChain() function, that overrides my…
1
vote
1 answer

Backhandler not working in jetpack compose

Hey I am using BackHandler from this stackoverflow. When I am pressing back button it's not working. Can someone guide me on this. ResultScreen.kt @Composable fun ResultScreen(navController: NavHostController, nearestResultList:…
1 2 3
99
100