Questions tagged [material3]

127 questions
1
vote
1 answer

Android - Change single item colour in Navigation Rail View

I'm using a NavigationRailView (com.google.android.material.navigationrail.NavigationRailView) in my Android application and I'm trying to change the colour of a single item in the navigation rail to make it look "disabled". I've tried the following…
Pycorax
  • 77
  • 5
1
vote
1 answer

IconButton.filled() raises not defined error

I was playing with the new Material 3 styles in Flutter and got some errors. The code I wanted to test was: Flutter>material>IconButton class using IconButton.filled() raised error on my project so I recreated the sample on my PC but still got the…
1
vote
2 answers

How to get Jetpack Compose Material 3 tonal colors & variations?

I use dynamic theming in my jetpack compose app, yet all the colors are just too dark. Just look at my top app bar. How do I get access to lighter variations of colorScheme, for example my primary color?
1
vote
2 answers

Jetpack compose theme color not applied

I created to kt files MainActivity.kt and MainPage.kt, I pu my own colors in color.ket and refeerenced them in theme.kt Omposables in MainActivity.kt get the right colors but MainPage.kt do not I have a card in MainPage.kt: Card( colors =…
1
vote
1 answer

How to make status bar color same as top app bar color in material 3 in jetpack compose

I want to make status bar as same as top app bar color in material 3 jetpack compose project and also want to achieve tonal elevation while scrolling. How to achieve this? val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior() Scaffold( …
1
vote
2 answers

Why colors are not applying in android material3?

I have recently familiarized myself with Material3 during my android learning journey. I have successfully defined colors in my colors.xml file, however, I am facing issues with the app bar, toolbar, and FAB not applying those defined colors.…
CODAR747
  • 230
  • 1
  • 12
1
vote
1 answer

Material 3 BottomAppBar Support Flutter

I am using material3: true in ThemeData Scaffold( appBar: AppBar(title: const Text('Bottom App Bar')), floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, floatingActionButton:…
Balaji
  • 1,773
  • 1
  • 17
  • 30
1
vote
2 answers

Android TextInputLayout and TextInputEditText cursor color

I want to change the cursor (or caret) color, just like in this stack overflow question, but in Material 3. This is my verion of the material library: implementation 'com.google.android.material:material:1.8.0' This is how my layout looks…
1
vote
1 answer

Text disappearing when adjusting height of TopAppBar on Android Jetpack Compose

I am trying to adjust the height of the TopAppBar in an Android app, using Jetpack Compose. When I update the Modifier of the TopAppBar to adjust to height = 150.dp, I see that the bar has a larger height but the text and navigation icon button…
1
vote
1 answer

How to customize Flutter Material 3 Switch?

How do I customize the Material 3 Switch? As you can see, I already did customize most of the switch to red, the only thing missing here is the "border", for some reason it is set to white and I cannot see a param where I can modify to red. I also…
Alex Rintt
  • 1,618
  • 1
  • 11
  • 18
1
vote
1 answer

Generating a Material3 theme based on a single arbitrary input color and applying it to Activities

I've set up my app to use Material3 colors roles and theme, and added an option to enable Material You support using DynamicColors. However, I would also like the user to be able to select a single (preferably arbitrary) input color within the app,…
Steve M
  • 9,296
  • 11
  • 49
  • 98
1
vote
1 answer

How to change the color of system navigation bar to match material 3 color in flutter

I want to change the color of Android system navigation bar to match the same color as NavigationBar at new Material 3 design like Gmail app. I tryed to use setSystemUIOverlayStyle, but I can't get the proper color from my material 3 theme.
1
vote
3 answers

Android Material3 Kotlin TopAppBar Unable to set background color

I am trying to create TopAppBar but could not find the backgroundColor field for the TopAppBar function. Material3 version which i am using implementation 'androidx.compose.material3:material3:1.1.0-alpha01' This is how my function looks like fun…
Santosh b
  • 729
  • 1
  • 8
  • 19
1
vote
1 answer

How to keep drawer always open

I want to put a drawer like this in my Flutter app: just like https://m3.material.io/develop/flutter I'm using NavigationRail and it's said that a menu button can be added to open a navigation drawer. Does any knows how to add the menu button and…
Kelvin
  • 11
  • 1
1
vote
2 answers

Changing startIndent in Material3 Divider

In androidx.compose.material the Divider component is defined as: @Composable fun Divider( modifier: Modifier = Modifier, color: Color = MaterialTheme.colors.onSurface.copy(alpha = DividerAlpha), thickness: Dp = 1.dp, startIndent: Dp…
1 2
3
8 9