14,276 questions
2
votes
0
answers
60
views
TextAlign.Justify only works on the emulator, not on a physical device
why are all the lines (not just the last line of the paragraph) aligned to the left on a real device, while on a virtual device they are aligned to the width of the screen except for the last one (as ...
0
votes
1
answer
80
views
Jetpack Compose chat input: extra space above keyboard and TextField height changes when text starts with spaces
I’m building a chat screen in Jetpack Compose similar to WhatsApp, with a LazyColumn for messages and a message input field anchored at the bottom.
I’m facing two related issues with the message input:...
1
vote
1
answer
163
views
ComposePausableCompositionException and IllegalStateException: Apply is called on deactivated node when fast scrolling LazyColumn with Coil AsyncImage
Hello everyone,
I am experiencing a persistent crash in my Jetpack Compose project while using Coil (AsyncImage) inside a LazyColumn. The data is being observed from a remote service via Flow.
The ...
2
votes
1
answer
127
views
Android compose material3 dropdown menu bug on landscape?
Is this behaviour a bug with the experimental material3 features on Android 16?
When the app is portrait mode everything works correctly on Android 15 and 16.
When the app is in landscape mode Android ...
Advice
0
votes
0
replies
56
views
How to port the interfaces from Android's view. java to the jet-compose system
I already know that you can use AndroidView in compose to achieve this goal, but what I'm thinking is how to wrap the interface so that the calling object of the interface is composable. Like this:
...
0
votes
0
answers
31
views
IntelliJ's composable preview engine is stuck after an error
I've got a Windows Desktop Application in Jetpack Compose and sometimes when I manage to break my code and refresh the preview, the preview engine immediately shows an error, as it should. However, ...
Tooling
0
votes
2
replies
83
views
How to use attachAccessibilityOverlayToWindow() from android accessibility service
Currently, i am using windowManager.addView() to add accessibility overlay to display. How do i use attachAccessibilityOverlayToWindow(int accessibilityWindowId, android.view.SurfaceControl sc) to add ...
1
vote
1
answer
112
views
Jetpack Compose:DropdownMenu ignores anchor and shows at bottom of screen in Compose Dialog
I am trying to implement a custom Jetpack Compose Dialog that contains two elements with their own anchored DropdownMenu:
A Header Row with a downward icon that should trigger a menu when clicked.
...
Advice
0
votes
1
replies
98
views
How can I improve unit tests for Repository pattern with Room and Retrofit in Android?
I am writing unit tests for my Android MVVM app.
The repository fetches users from an API and stores them in a Room database.
If the API fails, it loads cached users from the database.
I wrote the ...
Best practices
0
votes
0
replies
81
views
Shall type-conversion be the responsibility of a function/method?
I got the following Android UI-code:
OutlinedTextField(value = mainVM.srcAmount.doubleValue.toString(),
onValueChange = { // Implicit generated argument 'it' is a String.
mainVM.setAmount(...
0
votes
2
answers
89
views
Gradiant 1 pixel lign misscolor Jetpack Compose
My initial goal was to use gradiant to transition smoothly my picture into the background.
Using gradiant, I have a one pixel lign that breaks the natural transition to the rest of the card.
The line ...
0
votes
1
answer
125
views
"java.lang.IllegalStateException: Cannot start this animator on a detached view!" after upgrading project [closed]
I have an old project from around 2023 and I decided to upgrade all dependencies, Gradle and AGP. After fixing Gradle error("targetjvm is deprecated"), my app crashes after tapping at ...
Advice
0
votes
0
replies
45
views
How can I recreate this Telegram channel element?
This is the element I'm trying to recreate
There's it's wider version
As far as I get it, this element consists of something like:
Column {
FlowRow{Chat1, Chat2, Chat3}
...
0
votes
1
answer
72
views
Set an optional argument of IntType in a Route for Androidx Navigation
I'm using Androidx Navigation as a router in my app, whereas I have a bunch of different routes, and one has some arguments of the shape: route?$sectionArg={$sectionArg}&itemId={$itemId}. For ...
3
votes
1
answer
111
views
Performance Issue: 2x2, 3x3 Grid Video Playback Lag on Android TV
I am currently facing a performance issue while testing my Android TV application.
When I configure a 2x2 grid layout and play local videos (approximately 1 GB each) from the device storage, the ...