14,336 questions
0
votes
0
answers
27
views
How i change height of DropdownMenuItem?
I am creating an auto-complete TextField using ExposedDropdownMenuBox in Jetpack Compose. I am using a custom component, SpotifyTextField that has a fixed height of 48.dp.
My goal is to make each ...
1
vote
1
answer
36
views
Manifest Merge Error when using Blueline Kotlin lIbrary
I'm currently learning on how to use thermal printer, and found a library named Blueline. But when i implement it, app can't compile due to Manifest merger failed with multiple errors, see logs
This ...
-1
votes
1
answer
62
views
How to avoid duplicating state between parent and child screens when passing parameters built by childs? [closed]
In Jetpack Compose with MVVM, I have a parent screen that contains 3 child screens. Navigation is used to move between the child screens.
Each child screen can generate a PDF in different ways:
One ...
0
votes
0
answers
52
views
Android Hybird Fragment Compose layout, extra padding added after software keyboard shown
I have a hybird fragment, compose layout. After I tap on a text input, some extra padding is added under the app bar
My layout looks like this
<?xml version="1.0" encoding="utf-8&...
Best practices
0
votes
2
replies
54
views
Should a ViewModel live as long as the entire app? ViewModel inside Scaffold with BottomSheet + Google Maps
I am building a Jetpack Compose app that uses a Scaffold with a persistent bottom sheet.
The main content of the Scaffold show Google Maps, and the bottom sheet shows a menu.
I have a MapViewModel ...
2
votes
1
answer
60
views
How to handle errors in compose viewmodels?
Imagine something like this:
class FileModel: ViewModel() {
private val _state: MutableStateFlow<FileState> = MutableStateFlow(initialState)
val state: StateFlow<FileState> = ...
-4
votes
0
answers
37
views
Jetpack Compose [closed]
How can I implement the following behavior using Jetpack Compose? I have cards with multiple images (one or more). I want to implement a behavior where clicking on an image causes the image to animate ...
-2
votes
1
answer
77
views
How i disable bounce effect if button is not enabled? [closed]
I have disabled ripple effect in my entire project using CompositionLocalProvider.
@Composable
fun SpotifyTheme(
content: @Composable () -> Unit,
) {
val colorScheme = colorScheme
...
0
votes
1
answer
75
views
How to access AnimatedContentScope in navigation 3 in compose navigation?
Jetpack navigation 3 is now stable, and I am learning how to work with this type of navigation. One thing I'm missing is the AnimatedContentScope of shared elements using navigation. In navigation 2, ...
0
votes
1
answer
62
views
Latest version of Compose Maps dependency throws "IllegalArgumentException: source must not be null"
When using com.google.maps.android:maps-compose in version 6.12.2 I get the following error building the project:
org.jetbrains.kotlin.util.FileAnalysisException: While analysing <redacted>/...
-1
votes
0
answers
68
views
How can I resolve "None of the following candidates is applicable" when I want to add an image in Jetpack Compose? [closed]
I was learning and practicing how to use Jetpack Compose by doing a Columns exercise adding items. I started with Text() which allowed to add text and modify it at will.
The problem is when I set ...
Advice
0
votes
1
replies
26
views
Android Jetpack Compose UI testing: equivalent of espresso clearFocus()?
It is common to test inline errors by filling out a textfield and then clearing focus, as the validation happens after the user is done with it. In espresso that can look like:
onView(allOf(...
Advice
0
votes
2
replies
49
views
how can I improve seat rendering in compose when the layout is separated by section, row, and column
I confused why my apps is lagging when I scroll down to this seat layout, what's wrong with my code? Can somebody tell me how can I improve the performance. Here is my code that I used for to create ...
-3
votes
0
answers
49
views
Get current location (longitude, latitude) once directly without using Google APIs? [duplicate]
I'm using Kotlin and Compose, and I can't figure how to get the current location once via only GPS. I don't want to use Fused Location Provider. The location doesn't have to be precise and it's not ...
Advice
0
votes
2
replies
58
views
How to lock orientation in the age of adaptive layouts?
I sat down for the first time in a while to work on a personal project - a simple edge-to-edge 'touch to draw' app. I planned to lock the orientation to landscape only to prevent refreshes on rotation....