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

How to make a always on placeholder/hint for Jetpack Compose TextField?

M3 TextField has a placeholder parameter where it shows a text when it's focused and empty. But I want to show a placeholder or a hint always as the user is typing. Something similar to search suggestions but more like Github Copilot suggestions…
0
votes
1 answer

LazyList performance issues after Compose 1.4.0 update

I decided to update my project to stable Compose 1.4.0 because of some new fixes, but quickly found out that all of my LazyLists with clickable cards have become very laggy while scrolling. I make my cards clickable by just adding an onClick…
0
votes
0 answers

How to Provide a style for Collapsedtop bar in Material 3

I am using LargeTopAppBar of material 3 in my app . like below LargeTopAppBar( title = { Text("Title") }, navigationIcon = { Icon(Icons.Default.ArrowBack) }, actions = { /* add your actions here */ }, contentColor =…
0
votes
0 answers

How to fix title and navigationIcon are not aligned in Jetpack Compose?

I'm using TopAppBar in Material3, but I find that title and navigationIcon are not vertically centered. I tried using padding to align title and navigationIcon, but I was wondering what kind of bug this was.
Alsser Alss
  • 131
  • 1
  • 3
0
votes
1 answer

I am not able to use DatePickerDialog , DatePikcer view in latest M3 Compose Library?

I want to show DatePickerDialog in Compose project, and for reference I am using content provided by Android team on official Site, but when I am trying to use in project it is not resolving reference to this Composables. I try to find solution all…
0
votes
0 answers

Adding Material3 dependency conflicts with androidx.compose.runtime.livedata

Have faced pretty odd behaviour with Compose dependencies. I need implementation "androidx.compose.material3:material3:1.1.0-alpha07" But after it is added to the build.gradle and sync successfuly I have a variable val someVal by…
0
votes
1 answer

Remove corner background from the OutlinedTextField with a rounded corner border

Compose Material 3 I am trying to create a OutlinedTextField that has rounded corners. However, the white background can still be seen squared as the background. How can I remove this white background This is my…
ant2009
  • 27,094
  • 154
  • 411
  • 609
0
votes
1 answer

Wrap content of `ScrollableTabRow` composable so it goes past the screen width

I want to make a ScrollableTabRow that goes past the width of the screen to make it clearer that there are more tabs to scroll through. It should look something like this: When scrolled all the way to the left: When scrolled somewhere in the…
0
votes
0 answers

Material 3 NavigationBar change colorElevation on navigationBar

I have a NavigationBar in Scaffold, but its color elevation is 1.dp or 2.dp, but not 3.dp. Scaffold( content = { padding -> Box(modifier = Modifier.padding(bottom = padding.calculateBottomPadding()))…
0
votes
0 answers

Disable Ripple black shadow in jetpack compose

I want to disable black shadow when we disable Ripple effect on user click action. I tried from this answer 1 and answer 2. I made a github project to see the code. MainActivity.kt package com.example.disableshadow import android.os.Bundle import…
0
votes
2 answers

How to remove Surface padding in jetpack compose

In LazyColumn when we use LazyListScope.items with Surface. Inside multiple items there is extra padding on TOP and BOTTOM. I want to remove this padding. I am using Surface component of Material 3. BOM version is compose_bom = "2022.11.00". Please…
0
votes
0 answers

How to change TopAppBar height when using Scaffold under Material 3

I am using the Material 3 Scaffold with the material 3 TopAppBar. I need to change the height of TopAppBar but cannot use MediumTopAppBar as it's too heightened. Is there any way to do the same? Here is the code val scrollBehaviour =…
Nik
  • 2,913
  • 7
  • 40
  • 66
0
votes
2 answers

How to add divider in title in Alert Dialog in jetpack compose

I want to add Divider after title. I tried to add Divider(), but it goes to above the text. I am using Material 3 using implementation "androidx.compose.material3:material3:1.0.1" import androidx.compose.foundation.lazy.LazyColumn import…
0
votes
2 answers

How do you change card colors on material3 android when pressed?

How to set Background Color for Material3 Card in Android Compose? Piggy backing fro this question. The answers tells how to set a background color. When material3 card is pressed, it changes color with a ripple effect. But how can I change the…
0
votes
1 answer

Screen Flashes when using datastore to update UI

I am using Jetpack Compose to build my UI and when a user enters the app, the app will first check whether he/she is a first time user. If it's a first time user, it will load the ScreenStarter() composable. Else, it will load the AppContent()…