Skip to main content

All Questions

Tagged with
0 votes
2 answers
54 views

Composable not recomposing when state is changed inside the ViewModel

I am trying to show a circular progress indicator, when syncing of files start by setting syncing state to true. when syncing ends the variable becomes false. This is the code of my MainViewModel. ...
mumboFromAvnotaklu's user avatar
0 votes
0 answers
28 views

How to Persist Bitmap Image State Across Navigation in Jetpack Compose with CameraX?

I implemented a camera feature using Jetpack Compose. Here is my current implementation: ViewModel: var originImageUri = mutableStateOf<Uri?>(null) private set View: var capturedImageUri by ...
Lession Ryu's user avatar
0 votes
2 answers
116 views

Why is the status reset in Compose?

I am experiencing a very strange problem. I'm making a method to handle click events on the screen, as I want to save all the pointers in a map with their id and position, I have a state class in ...
Ludiras's user avatar
  • 424
0 votes
1 answer
71 views

Problems trying changing states in Maui with DrawingView

I´m using a DrawView in Maui Android to get the sign of a person. I get perfectly the stream of the image, create a pdf with that image and then Navigate to the next view perfectly. I am binding the ...
hugo vazquez's user avatar
0 votes
0 answers
22 views

Is there a way to change/define state in using an emptyComposeRule?

I have a page that uses both Views and Compose and I'm trying to create an automated test for it. Referring to https://developer.android.com/jetpack/compose/testing. You are able to define a state ...
Kailun Ng's user avatar
0 votes
0 answers
41 views

Widget not constantly rebuilding + State issues

In my audio player I'm currently facing an issue. So how I set up the controls for the song (pause/play, rewind, etc.) is that when you click on a button, a modal sheet pops up. In that modal sheet ...
Srinidhaya Vempati's user avatar
0 votes
0 answers
71 views

What is the right approach to handle asynchronous task in compose (Android)

As I am making progress in learning compose and Android in general. I need some help regarding best approach to handle async task. lets say I have a button that call some methods of a view model //...
Muddassar's user avatar
  • 471
1 vote
0 answers
40 views

Idea needed: How to make viewmodel state - drag&drop in compose list that can be edited

I have a very simple list on the screen. Data goes from viewmodel state from database as observable flow (very ordinary case) List item is very simple: it has id, name, order_ (the order of item in ...
Foenix's user avatar
  • 476
0 votes
2 answers
574 views

Observing a variable's state within a ViewModel

I'm trying to wrap my head around ViewModels and how variables within are observed. I would like to figure out how to observe variables within a ViewModel and trigger actions when they do change. ...
OldDogNewTricks's user avatar
0 votes
2 answers
399 views

In Jetpack Compose, how can you make a new element always appear on the top of whatever content there is?

I have two buttons, each one will make a text appear on the top of the screen content. If I press Button A, then a text "Here is A" should appear at the top of the screen. If I press Button ...
user22376410's user avatar
1 vote
0 answers
181 views

How to implement a global UI state for isLoading in Android Jetpack Compose?

I'm working on an Android Jetpack Compose project and I want to implement a global UI state to handle loading indicators across different screens. What's the recommended approach to create a global ...
Takeshi567's user avatar
1 vote
1 answer
85 views

How to remember state during recomposition in compose?

@SuppressLint("DiscouragedApi") @Composable fun PuzzleScreen( navController: NavHostController, sharedViewModel: SharedViewModel, letter: String, puzzleViewModel: ...
Misha Kamskov's user avatar
0 votes
2 answers
64 views

Modifying mutableList value outside of composable not saving one parameter, but saving other

I have an object, Day, with 2 required parameters; An id (Int) which is generated in another composable (which is transferring the value correctly), and a values parameter which is a list of Doubles (...
ilivetruth's user avatar
0 votes
1 answer
128 views

Flutter UI State only updates when I hot reload

so heres how it looks like: when i press add and input any data it saves it but doesnt update the ui so for some reason only when i hotreload it updates dashboarditems list to like this: idk what ...
BroTrustMe's user avatar
0 votes
0 answers
32 views

Android composable doesnt recompose after deleting item from room db

I have a room db holds favorite entities and i have a stateflow containing list of favorites in database and i have another boolean state holds if a specific favorite is in the db but when i delete ...
Sevdet Neng's user avatar

15 30 50 per page
1
2 3 4 5
34