Questions tagged [android-jetpack-compose-material3]

Jetpack Compose now has Material 3 support! This tag is for questions specifically related to Material 3 Composables, or the migration process from Material 2 -> Material 3 in Compose.

Jetpack Compose now has Material 3 support, though as of late 2022 there are still various experimental APIs and some aspects are not implemented.

Package documentation can be found here.

226 questions
0
votes
1 answer

Compose Material3 How to change the colour of a button from a different thread?

I want to be able to show the status of external processes (e.g. Gps, connection to a device) in the UI using kotlin, Compose, and Material3. I am stymied by the need to be in a Composable function to make this change, or to call a Composable…
0
votes
1 answer

Facing Issue with BasicTextField-Unable to see cursor at Initial state and Password option not working

I have made a composable function for TextInput....But in this Unable to see cursor at Initial state and also when I set KeyboardType.Password the password option doesn't appear I appear as normal text only I am not able to rectify the issue where…
0
votes
1 answer

Material3 DatePicker background color in compose

I use DatePicker from material3 with custom colors. I want to change background color of DatePicker. As I understand I need to change actually the elevation overlay color of Surface. But how I can do it? Here is my…
0
votes
1 answer

How to prevent a gap between the keyboard and a bottom-aligned button in Android Jetpack Compose?

I want to have a button that is always at the bottom of the screen, when the keyboard opens it should go up with it and when it closes the button should go down again. I tried different ways, with a Box wrapping everything and different…
0
votes
1 answer

How to crop specific areas of a container while preserving the shadow underneath in Jetpack Compose?

I have a container (Card, Box, or whatever..) that contains two problematic areas, marked with red circles. I need to crop these areas out while ensuring that the shadow underneath is preserved. I have tried different approaches, but I couldn't…
0
votes
0 answers

Syncronize Infinite Transition for colors in Android Compose

I am creating a UI for Android using Kotlin, Jetpack Compose, and M3. I have the following composable function: @Composable fun BlinkingCards() { val blinkAnimation = rememberInfiniteTransition() var isSecondCardBlinking by remember {…
0
votes
1 answer

BottomNavigation items throw IllegalStateException when clicked

When I click on any of my BottomNavigation items I get an IllegalStateException. This is my initial code that I expected to work BottomNavigation(contentColor = colorResource(id = R.color.white)) { val navBackStackEntry by…
0
votes
1 answer

Getting an IllegalStateException exception with BasicTextField in Jetpack Compose

I have a BasicTextField with a hint. However, for some reason when I put some text in, then delete everything and try to input again, the app crashes. Have no idea how to fix it, any help would be much appreciated :) I use compose BOM of 2023.04.01,…
0
votes
0 answers

Disable back button in ModalBottomSheet

I want to disable back button in the new material3 1.1 ModalBottomSheet. But cant get it to work, it always hides on back button in my attempts so far. Any creative ideas? Code below still hides bottom sheet on back press @Composable fun…
0
votes
1 answer

How to remove top-right and bottom-right rounded corners in ModalNavigationDrawer() component in Material3?

Check in the image below: I tried this but not worked. ModalNavigationDrawer( drawerState = drawerState, drawerContent = { ModalDrawerSheet( //case-1 modifier =…
0
votes
1 answer

Removal of the upper TopAppBar without the part below

I come to ask you for help concerning a small problem I can't find the solution. I'm making a small application in Jetpack Compose, and I can't get the TopAppBar to disappear and leave only the part that slides up. This is a…
0
votes
3 answers

Change button text without changing the button width?

Consider the following code: val saveInProgress = false // in reality might come from a ViewModel Button(onClick = {}) { val text = if(saveInProgress) "Save" else "..." Text(text) } When saveInProgress is set to true, the Button text gets…
0
votes
1 answer

Compose: TopAppBar default height for Material3?

How can I find out the default height for the SmallTopAppBar (or just TopAppBar)? I am implementing a SearchView that replaces the topBar with a similar looking bar with the Search TextView but I cant find out how to apply the proper height. In…
0
votes
0 answers

Android Google Material 3 Font icons - Can not extract resource from com.android.aaptcompiler.ParsedResource@1c5bdfd0

I have imported an icon from Google Fonts site into my Android project. I saved the svg file to a new assets folder. I then used it to create a vector resource. I then call it in my program like so: Icon( …
0
votes
1 answer

Compose Material 3 Theme customization

Can we customize colors and provide only our custom colors for theeme in jetpack compose material 3?