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
8
votes
5 answers

What is color of NavigationBar in Jetpack Compose in Material color scheme?

When I`m trying to force NavigationBar to be MaterialTheme.colorScheme.surface color(see Material 3 Guidelines), background color of app and color of NavigationBar differs. Example: color of NavigationBar is #f1edf7 but background color is #fffbfe.…
7
votes
0 answers

Android compose LazyRow inside LazyColumn gives junk behaviour

I am trying to create one compose screen with nested scroll behaviour. For that I am using lazyColumn as parent and inside that I do have multiple rows with layRow. val scrollState = rememberLazyListState() LazyColumn( state = scrollState, …
7
votes
3 answers

This material API is experimental and is likely to change or to be removed in the future. error in android when using new material3 card

How to set elevation for material3 card? I am using new material3 card and getting error This material API is experimental and is likely to change or to be removed in the future. Here is code -> @ExperimentalMaterial3Api @Composable …
6
votes
1 answer

How to use swipe (pull) to refresh with Material 3?

val pullRefreshState = rememberPullRefreshState(loadStatus is LoadState.Loading, onRefresh = { photosResponse.refresh() }) Box( modifier .fillMaxSize() .pullRefresh(pullRefreshState) I have updated Material 2 to Material…
6
votes
1 answer

Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: ':app:debugRuntimeClasspath'

I am trying to upgrade to compose compiler 1.3.2 by upgrading to kotlin 1.7.20 but i keep getting error saying Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files…
6
votes
1 answer

Unexpected Text colour alpha in Jetpack Compose Material Theme

I discovered today that MaterialTheme applies an alpha to Text's colour. As you can see from the example attached, when I change the background colour, the text's colour appears to be different because it has a transparency value. I can force set a…
6
votes
3 answers

Unresolved Reference error for ScaffoldState with Material3

Android Studio throws an Unresolved Reference error for ScaffoldState with Material3. How can I make it work? import androidx.compose.foundation.clickable import androidx.compose.material3.* import androidx.compose.material3.Icon import…
6
votes
1 answer

Customization of Material 3 LargeTopAppBar

I'm currently working on a Header in Compose that uses LargeTopAppBar from Material 3. The issue is, that the title is not very customizable and neither is the scrolling animation(that uses nestedScroll). I would like to add a subtitle underneath…
6
votes
4 answers

Problem with updating compose version to 1.3.0-alpha01

I have an Android Studio project that works fine when I'm using Kotlin version 1.6.21 and compose version 1.2.0-rc01. The problem arises when I want to update both dependencies to the latest versions, which are 1.7.10 for Kotlin and 1.3.0-alpha01…
6
votes
2 answers

how to do a swipeable on Material3 compose

On the Material and Material2 Compose there was a SwipeableState and a swipeable option on the Modifier. But in Material3 this doesn't exist, at all. So how do you create a Swipeable in Material3? If anyone knows please share.
5
votes
1 answer

How to show snackbar in Jetpack Compose material 3

I started to learn Jetpack Compose and it looks confusing how to implement a simple snackbar, using material3 dependencies. Documentation shows I need a scaffold and it needs a content with padding (?). Do I need put my screen composable inside…
5
votes
5 answers

Jetpack Compose: How to modify the width of Drawer in ModalNavigationDrawer?

Recently I've been trying Material3 combined with Jetpack Compose, and I need a drawer along with a scaffold in one of my screen. It's sad that Scaffold in material3 hasn't support drawer yet, but luckily ModalNavigationDrawer can be found as a…
5
votes
5 answers

Jetpack Compose LargeTopAppBar Displays Title Twice

I'm trying to build a Jetpack Compose app with Scaffold and a LargeTopAppBar. I currently have a very simple UI with only the LargeTopAppBar in a Scaffold, but when I run my app I see two small titles at the top of the screen. Any ideas why this is…
4
votes
1 answer

Android: How to prevent Scaffolds top app bar from redrawing in Jetpack Compose Navigation?

When navigating between two Screens, where each holds a Scaffold with a TopAppBar, the TopAppBar is animated to go out of the UI and back in. (short white flash in my example, just like the button animation) I guess this behaviour is expected as…
4
votes
2 answers

ModalBottomSheet in Material 3 for compose

I have switched from Material 2 to Material 3 in my android compose project : I have this dependencie which is the latest stable one : implementation ("androidx.compose.material3:material3:1.0.1") As mention in the docs i should be able to import…
1
2
3
14 15