All Questions
70
questions
3
votes
1
answer
115
views
Logic to check if app was launched for the first time using DataStore
I have written a dummy code to check if an app was launched for the time using DataStore. It is working however i want to know if this can be optimised and i also observed a small glitch initially ...
2
votes
1
answer
68
views
Handling View State & Side Effects with Lifecycle Awareness in Jetpack Compose MVI Composable
I'm working on a stateful Jetpack Compose composable that follows the MVI architecture. I'm using collectAsStateWithLifecycle() to observe the view state from a view model, but I'm unsure about the ...
5
votes
1
answer
89
views
Compose Grid With Lists
I have created a Grid out of using the new concept of List in Kotlin. I'm open to any feed back to how this code could be improved. It functions as expected and I'm happy with the results.
...
2
votes
1
answer
389
views
Android: Navigation with Hilt + Jetpack Compose
The project is simple:
Login screen and a forgot password screen. You can navigate from Login to ForgotPassword.
I feel like I overcomplicated things, but I don't know if (and how) it can be ...
4
votes
0
answers
907
views
Wrap location API in coroutines
In my app I need to query location and scan wifi periodically. To conserve power I need to change the rate dynamically, depending on the distance to the target. Also I want to wait for both ...
4
votes
1
answer
2k
views
Correct flow between Kotlin, Realm and ViewModels using Coroutines
I'm stepping back into Android after being away from it for about a year. Trying to get an out of date app of mine back on its feet, and continuing work on it.
The app was written using Java, MVP, ...
1
vote
0
answers
57
views
Architecting my Compose UI
I have designed a layout that includes recipe details and three CTAs in the app bar to share, delete, and edit recipes. I need feedback regarding the architecture of my Compose UI.
...
1
vote
0
answers
64
views
Learning Jetpack Compose: TabBar with Paging Screens
I'm piecewise reimplementing an existing iOS app. My initial go at it visually looks like this:
I'm looking for any feedback on more idiomatic ways to implement what I've done. There's a couple of ...
1
vote
0
answers
263
views
Jetpack Compose: Items-list with Item-Details-view
The app is based upon an exercise from a Udemy-course. The purpose is to become familiar with LazyColumns. I've enhanced the exercise with a Details-view and a navigation between LazyColumn and ...
2
votes
1
answer
259
views
MutableLiveList class for android
I have wrote a MutableLiveList class for android, similar to existing MutableLiveData, but this class instead handles a list and ...
0
votes
3
answers
217
views
Android - A way to show/hide loader without writting false/true in every viewmodelScope.launch
I have been writting a lot of code that looks like this
...
4
votes
1
answer
894
views
Android + Kotlin advanced color picker (HSV and RGB)
For almost the past year, I have been working on a pixel art editor for Android.
My pixel art editor was relying on an external library for its color picker. For 0.2.0, I wanted to change this by ...
2
votes
1
answer
48
views
Observe LiveData to indicate whether or not to display TextViews in MVVM
In the context of MVVM, is this an efficient way to communicate to the view that I should display some TextViews? Any advice on how I can improve it?
ViewModel code:
...
2
votes
1
answer
76
views
Processing charge current error messages with HashMap<>
I have certain error states that I am displaying in my Android TextView but only one message is displayed at a time and if all values are set to 0, no message is displayed. So, I check all the values ...
3
votes
0
answers
1k
views
Jetpack compose login screen + ViewModel
Im working on the login screen for my application. It has fields for users email and password. Also users can click on forgot password button to send an email with new passsword. It can validate these ...