Category "android-jetpack-compose"

super.Composable function crashes at text input

App crashes when trying to type in TextField that is in superclass (video: https://imgur.com/a/6RNc2mU) Exception: E/AndroidRuntime: FATAL EXCEPTION: main Proce

Jetpack Compose Slider in LazyColumn changing while scroll

I have a list that includes Slider the problem is when I scroll the slider detecting the tap event and change it, see attached gif The excepted behavior is whe

Layout not moving up when keyboard is open in Jetpack Compose

I have a layout in Jetpack Compose where I have a couple of composables (text view and input) that I need to stay at the top of the screen, and then another com

How to call keypress event programmatically for TextField using jetpack compose, android?

When user type in TextField it will call onValueChange{} callback. but when we set the value in TextField the onValueChange{} callback will not call. I found ht

Sharing viewModel within Jetpack Compose Navigation

Can anyone suggest how to share a ViewModel within different sections of a Jetpack Compose Navigation? According to the documentation, viewModels should normall

Passing uri between compose screens causes: SecurityException: Permission Denial

I receive a uri in screen "A" by: val launcher = rememberLauncherForActivityResult(ActivityResultContracts.StartActivityForResult()) { activityResult ->

Backend Internal error: Exception during psi2ir in Jetpack compose

I am getting this error during compilation or code generation, I have set the Jetpack Compose dependencies and working on it, I have made some compose component

OnKeyEvent without focus in Jetpack Compose

I am creating an app that makes use of a physical button on the device. This button will have a different functionality depending on the screen that is active.

How request permissions with Jetpack Compose?

How should be implemented requesting permission from Jetpack Compose View? I'm trying implement application accessing Camera with Jetpack Compose. I tried examp

jetpack compose LazyLayout parameters in not Specified

I want to develop a LazyLayout in jetpack compose @ExperimentalFoundationApi @Composable fun LazyLayout( itemsProvider: LazyLayoutItemsProvider!, modifi

Jetpack Compose BottomSheetScaffold sheetGestures disabled but gestures still works when child component is scrollable

I have a BottomSheetScaffold inside my android app that looks like the following: BottomSheetScaffold( sheetGesturesEnabled = false, sheetConte

Surface at +(...)% colors in jetpack compose

In official Material Design 3 resources (e.g. the Figma design kit), there have been many references to colors called "Surface at +x". These colors are the surf

Jetpack compose Switch() TrackWidth, TrackStrokeWidth, ThumbDiameter

Maybe someone can tell me how to set in Switch() size for TrackWidth, TrackStrokeWidth, ThumbDiameter Switch( modifier = Modifie

java.lang.NoSuchMethodError after upgrading Jetpack Compose to 1.0.0‑beta07

I'm getting the following error running observeAsState on a LiveData object after I upgraded Jetpack Compose to 1.0.0‑beta07. java.lang.NoSuchMethodError:

Jetpack Compose on Kotlin 1.5.0

I've updated to Kotlin 1.5 last week, and after yesterday having seen the intention of Google to make Jetpack Compose the preferred option for designing UIs, I

How to make kotlin operator a Composable with parameters having default value

I'm trying to make Kotlin's invoke operator a @Composable, everything works fine, until I add a parameter to it, which should have a default value. See the code

App crashes using the new Android 12 Splash Screen API

I'm trying to use the new Android 12 Splash Screen API but my app keeps crashing when opening the first activity. I have MainActivity as my launcher activity wi

How to safely (lifecycle aware) .collectAsState() a StateFlow?

I'm trying to follow the official guidelines to migrate from LiveData to Flow/StateFlow with Compose, as per these articles: A safer way to collect flows from A

Unresolved reference with Modifier methods in Jetpack compose

I'm learning Jetpack Compose and I was trying to customize a display of an image with Modifier methods height and padding. But I got the Problem messages "Unres

Cannot create viewmodel from composalbe function

I have a view model. I am using Hilt. I can create this view model from activity, like this val model: ProfileViewModel by viewModels() However when I try to c