Skip to main content

Questions tagged [android-jetpack-compose]

Jetpack Compose is Android’s modern toolkit for building native declarative UI made by Google. If you're targeting desktop with Compose for Desktop, use both this and [compose-desktop] tags.

android-jetpack-compose
0 votes
2 answers
20 views

Timer Increments By One Whenever User Tries To Reset It Back To Zero In Android

I made a standard stopwatch app in Android Studio using jetpack compose. It gives the user the ability to reset the stopwatch back to zero, however there is a problem. The stopwatch will reset back to ...
Bob Rasner's user avatar
0 votes
1 answer
15 views

How to display text beside marker in Google maps in Jetpack Compose

I am using Google Maps in my jetpack compose project. I want to display text beside the marker. I tried using Marker() it shows a marker but not text. It shows text when I click on the marker but I ...
Pawandeep Singh's user avatar
0 votes
0 answers
10 views

Can xml theme attributes be overridden or ignored in compose dialogs?

When trying to use the material 3 AlertDialog in my native xml/compose Android app the AlertDialog background is not transparent. In my xml app theme I'm using the following custom dialog theme: <...
Sasha's user avatar
  • 1
0 votes
0 answers
19 views

How to run a function when navController.popBackStack() is called in Jetpack Compose?

I have a list of "clients" which are presented using a lazy column on a screen. I am able to enter each client (navigate to another screen) and edit the information of this client, but when ...
appeldaniel's user avatar
1 vote
1 answer
8 views

SharedTransition lookaheadRoot has not been initialized

Using SharedTransitions in Jetpack compose, I got the following error : FATAL EXCEPTION: main (Ask Gemini) Process: com.example.bacasable, PID: 10130 kotlin.UninitializedPropertyAccessException: ...
AdrienM's user avatar
  • 65
0 votes
0 answers
14 views

Why isn't my data updating in child composables?

Im collecting data from my db in my viewmodel. I know its being updated in BottomSheetEditContent, but i don't know how to make it show its's value (the one collected from viewmodel) in child ...
Michal Rymarski's user avatar
0 votes
0 answers
33 views

How to add a click listener to an Image created with DrawScope drawImage?

I'm trying to make an interactive map (scheme) with clickable markers. To handle gestures I use ZoomableImage from implementation("de.mr-pine.utils:zoomables:1.4.0"). To draw markers I use ...
exprnc's user avatar
  • 1
2 votes
2 answers
33 views

Unable to create updated UI with new image in JetPack Compose

I'm trying to create simple Dice Roller JetPack Compose App. I create an Image compose and button compose. Whenever I click on the button, log statement shows button is clicked but I'm unable to ...
Aamir Khan's user avatar
0 votes
0 answers
22 views

How to make a Drag and Drop with LazyColumn in Jetpack compose?

I'm making a feature called DragAndDrop with LazyColumn. To implement this feature, I referred to an article by Suraj Sau. The article is great but it's slightly different from what i want to make. ...
CodingBruceLee's user avatar
0 votes
1 answer
31 views

How i can re-execute StateFlow in ViewModel Android? I have use case where i needs to do refresh of data

I am trying re-execute StateFlow in ViewModel (refresh something, new API request...), but it not work. This is my simple example about counter: Viewmodel class CounterViewModel( private val ...
Thai Manh's user avatar
0 votes
0 answers
18 views

Unresolved reference when adding module dependency in Gradle for Compose Multiplatform project

I'm having trouble resolving a module dependency in my Compose Multiplatform project. I have a module named designSystem under the path composeApp:core:designSystem, and I'm trying to include it in my ...
Hossam Sadekk's user avatar
0 votes
1 answer
32 views

Composable inheritance... how to add padding to inherited content?

I want to do some kind of Composable Inheritance. I need a parent composable with a Scaffold, and the children must have the inner content to the scaffold. How can I apply the innerPadding to the ...
NullPointerException's user avatar
0 votes
1 answer
22 views

How to change the color of the TextField cursor handle in Compose Material 3?

Specifically, the CompositionLocalProvider approach works for a BasicTextField but not for a TextField: val customTextSelectionColors = TextSelectionColors( handleColor = Red, ...
Peter's user avatar
  • 737
-1 votes
0 answers
9 views

Mongo DB Driver for Android Native Jetpack Compose. I do not want to use Mongo DB Realm or Atlas App [closed]

Mongo DB Driver for Android Native Jetpack Compose. I do not want to use Mongo DB Realm or Atlas App. Expecting to get a library or mongo db driver. just like pymongo for python. I do not want to use ...
Rasik Mohammed's user avatar
1 vote
0 answers
28 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 (...
Always Learner's user avatar
0 votes
0 answers
27 views

How to create LazyColumn with both draggable and non-draggable titles and dividers?

I found an example of simple lazy lists with draggable items and tried to modify it to suit my needs. I need to be able to list the indices of the elements on which dragging doesn't work and, if there ...
Данил Бессонов's user avatar
0 votes
2 answers
37 views

TextField data is not getting clear

When the user enters a password value and cancels the dialog, the dialog is pre-filled with the previous password, but the email is successfully cleared. However, the password is not cleared. If I ...
Shivam's user avatar
  • 182
0 votes
0 answers
11 views

How to know if item is highlighted by TalkBack frame?

I'm working on accessibility issues in my app, written in Kotlin using Jetpack Compose. I have a bug that I think I can solve if I could know when a UI component is highlighted with a TalkBack frame - ...
dodgeRam's user avatar
0 votes
0 answers
32 views

Android. How to show button above keyboard on bottom sheet dialog?

I'm using BottomSheetDialogFragment with composable content: override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?, ): ...
testivanivan's user avatar
  • 1,318
1 vote
1 answer
37 views

Compose: Using SnapshotStateMap to avoid recomposition of every item in a map

I have an app that reads properties from a file. The file can be changed outside of my application, it can be deleted or fully replaced. My goal is to read the .properties file and show a preferences ...
kristyna's user avatar
  • 1,624
0 votes
2 answers
28 views

How to pass data between composable screens in android compose app?

I want to pass data between 1st composable screen to 4th composable screen. How we can pass data from 1st screen to 4th screen without passing to 2nd and 3rd through navgraph?
user7029573's user avatar
0 votes
0 answers
15 views

Android animatedVectorResource causes Resources$NotFoundException

I'm trying to use AnimatedImageVector.animatedVectorResource to display an animation in Compose, but every mentioned call causes an exception: android.content.res.Resources$NotFoundException: Resource ...
mipolansk's user avatar
0 votes
0 answers
30 views

How do I control my own programmed kotlin wear os stopwatch app with the bluetooth headset buttons skip forward and skip backward?

I programmed a wear OS app in Kotlin (and Jetpack Compose). The app is a stopwatch app and therefore has a start function and a stop function. Previously, these functions were triggered using a touch ...
Mr. WTG's user avatar
1 vote
0 answers
22 views

Vico Charts in Jeptack Compose

type here. LaunchedEffect(Unit) { withContext(Dispatchers.Default) { while (isActive) { modelProducer....
Yusufjon Akhmedov's user avatar
0 votes
1 answer
38 views

Trigger recomposition with state objects

I'm having trouble understanding why recomposition does or does not occur. I have an object which describes a vehicle and there are two dropdowns in a dialog which allow selecting a make and a model ...
moonlightcheese's user avatar
0 votes
0 answers
44 views

R8 Minification Fails After Upgrading to Jetpack Compose BOM 2024.06.00 with SDK 34 Migration

I recently upgraded my project from Compose BOM 2023.06.01 to 2024.06.00 after migrating to SDK 34. While the debug build works fine, the release build fails during the R8 minification step with ...
Shubham Bhattacharyya's user avatar
1 vote
0 answers
18 views

How to apply AnimatedVisibility and animateItemPlacement together?

I am using androidx.compose:compose-bom:2024.06.00. The items of a LazyColumn are animated at the launch of the screen: @Composable fun SampleList(samples: List<Sample>) { val state = ...
JJD's user avatar
  • 51.3k
0 votes
1 answer
44 views

kotlin - How to scroll a scrollable column inside a Jetpack Compose ModalBottomSheet?

I am using Kotlin v1.7.20 and androidx.compose.material3 implementation v1.3.0-beta04. I need to fit a content into a bottom sheet. This content is so long, and its height exceeds the device's height ...
groaking's user avatar
0 votes
1 answer
45 views

How to attach slider to the bottom of bar in Compose?

I want to make a spotify clone app, I am trying to build a similar bottom bar like the image, but i were unable to make slider fill max width (without padding from left, right, bottom). @...
Fatima Jamal's user avatar
0 votes
0 answers
14 views

Pointing the camera at the coordinates

I will point the camera to the coordinates according to the existing API. but only the marker can go to the coordinates but not the camera. Please help I include my code snippet // Membuat objek ...
Chaidar Aria's user avatar
0 votes
1 answer
26 views

Kotlin + Jetpack Compose: vararg with multiple generic types

I have this composable: @Composable inline fun <T:Any> AnimatedVisibilityNullable( value: T?, ... crossinline content: @Composable (T) -> Unit ) { // for nullable values ...
Federico Corzo's user avatar
0 votes
0 answers
16 views

How to add tap listener on childNodes of ModelNode?

I am currently working on an AR Application for Android with Kotlin and JetPack Compose using SceneView for AR and the 3D Rendering. The Problem At one point i have to display a 3D Model, which has ...
ofreezy's user avatar
0 votes
0 answers
11 views

OnClick Compose GoogleMap Cluster/Item show InfoWindow without camera move

Using this example activity: https://github.com/googlemaps/android-maps-compose/blob/main/app/src/main/java/com/google/maps/android/compose/markerexamples/MarkerClusteringActivity.kt I want to only ...
Mario Huizinga's user avatar
1 vote
1 answer
67 views

How to achieve this overlapping effect in Jetpack compose

How do I achieve this overlapping effect in Jetpack compose. I am trying to get the precise position and placement just like the one shown in the picture, specifically of the ones circled in blue, the ...
Daniel Iroka's user avatar
0 votes
0 answers
35 views

How to replace profile icon with name initials in bottom navigation bar once user logedin in Android compose application [closed]

How we can replace a profile icon in the bottom navigation bar with firstname and lastname charecters dynamically
user7029573's user avatar
0 votes
0 answers
17 views

Compose TextField lose focus when newline on Samsung Note 10 Lite

Surface { Box(contentAlignment = Alignment.Center, modifier = Modifier .fillMaxSize() .padding(32.dp)) { var state by remember { mutableStateOf(TextFieldValue("")) } ...
Jeff Liu's user avatar
  • 131
0 votes
1 answer
34 views

How Do You Make A Foreground Service Notification Only Appear When The App Is Closed Or In The Background In Android?

As the title says, how do you make a foreground service notification only appear if the app is closed or in the background? I have a sample app I'm trying to implement that feature into to but I don't ...
Bob Rasner's user avatar
0 votes
1 answer
38 views

ConstraintLayout in compose multiplatform?

How to use ConstraintLayout in multiplatform compose.. commonMain.dependencies { implementation(compose.runtime) implementation(compose.foundation) implementation(compose....
Ahsan Ali's user avatar
  • 193
0 votes
1 answer
23 views

Adjust two Text whit overflow for the first one

I have two Texts in the Row. The first one can have relatively short or long content, potentially not fitting the row's size. The content of the second text is always constant. If the content of the ...
Maksim Golendukhin's user avatar
0 votes
0 answers
37 views

Jetpack Compose TextField Not Showing 'text' Property in LambdaTest/Appium Automation Testing

Description: I am working on an Android application that utilizes both XML and Jetpack Compose for its UI components. The application runs correctly during normal use, but I am encountering issues ...
Naman Sharma's user avatar
1 vote
1 answer
55 views

How to prevent click gesture on screen when Popup is shown?

When TooltipBox is open clicking any Composable on screen has no effect other than dismissing Popup. How does it do it and what's effective way to implement it no matter where current Composable is in ...
Thracian's user avatar
  • 59k
0 votes
1 answer
29 views

bias in jetpack compose ConstraintLayout

For example, I want the right side to align with Image's start when the Text width is less than screen's width, and the Text will wrap automatically when the Text's width is more than screen's width ,...
ggboundzhl's user avatar
2 votes
0 answers
46 views

Jetpack Compose CRUD application views don't refresh

I'm new to Android Compose. I'm generally teaching my daughter how to code and we decided to start with something that has an UI,so we chose Android to start. I made an app in Jetpack Compose and I ...
Piotr Klimaszewski's user avatar
0 votes
1 answer
33 views

TextField Inside ExposedDropdownMenu doesn't show software keyboard

I have a ExposedDropdownMenu and the first Menu item is a OutlinedTextField that filters the menu items. It's work fine in VM and physical keyboard but it doesn't show software keyboard on VM and ...
ehsan khormali's user avatar
0 votes
0 answers
42 views

can someone explain the strange recompositions that happen using datastore, outside or via lambda of main composable

I have this code where first and third surfaces(and all its content) recompose when clicking on the first surface. However, only the second and third surfaces(and all its content) recompose when ...
Zen1000's user avatar
  • 157
0 votes
1 answer
95 views

Composable recomposing even with strong-skipping mode enabled

I have tested this using Kotlin 2.0.0, 2.0.10-RC and 1.9.20 just to be sure thisn't some weird Kotlin compiler issue. However, I am currently struggling to understand how lambdas affect the ability to ...
Andre Thiele's user avatar
  • 3,901
2 votes
2 answers
89 views

Android compose: offset at a fraction of parent size

I want to place some composables at specific positions on top of an image. However, the image will be responsive (it will resize), so I can't use Modifier.offset(some_fixed_offset.dp). Modifier.offset(...
Erik Bongers's user avatar
0 votes
0 answers
23 views

How to remove unexpected shadow on ElevatedCard in Jetpack Compose?

I have an ElevatedCard in my app and it looks really good: and its code is here: ElevatedCard( content = { Text( fontSize = 20.sp, text = "All cars", ...
Mark Delphi's user avatar
  • 1,657
1 vote
0 answers
24 views

How Do You Pass A Function Into Foreground Services In Android Studio

I'm trying to create an application in Android Studio that consists of a timer that runs in the background. To achieve this I'm passing the timer functionality into a foreground service class. However,...
Bob Rasner's user avatar
1 vote
1 answer
63 views

There is a delay when saving data into a Room Database

I'm trying to create a stop watch application. Everything works fine at first. The stop watch goes up from the milliseconds, to the seconds, to the minutes just fine. There are two timers, one of the ...
Bob Rasner's user avatar

15 30 50 per page
1
2 3 4 5
264