Questions tagged [material-you]

Use this tag for Material You or Material Design 3 related questions. https://m3.material.io/

44 questions
20
votes
1 answer

Android 12: How to prevent activity restart on changing phone wallpaper?

On Android 12, If we open an activity Go to the home screen of the phone to change the wallpaper Switch back to our activity, the activity restarts. It seems it is related to the Material You theming. I would like to disable the restarting of…
q126y
  • 1,589
  • 4
  • 18
  • 50
15
votes
1 answer

How to implement themed icons by Material You in my Android App?

I can't find anything about that online, no documentation, nothing. Maybe one of you know how to do it or have got some advice for me. Thank you in advance.
Tom
  • 173
  • 1
  • 6
13
votes
3 answers

"Theming Icons" functionality crashes live wallpapers on Android 12

I recently noticed that my live wallpaper apps are crashing when users try to set the newly introduced "Theming Icons" functionality on Android 12. This new functionality calculates a palette of colors from the user's current static wallpaper and…
Ardi
  • 285
  • 3
  • 8
10
votes
4 answers

Adjust androidx.preference dialogs to follow Material You

I have two apps containing a preference section, and i'm using the preference library, the latest version available at the time of writing: implementation "androidx.preference:preference:1.2.0-rc01" Now, i themed my app to use and follow the…
9
votes
1 answer

Material3 Color Harmonization in Jetpack Compose

While using the view-based system, we can harmonize a color using the below code. MaterialColors.harmonizeWithPrimary(context, colorToHarmonize) In a project that is fully migrated to Jetpack Compose and all the color values are stored in the…
9
votes
2 answers

How to change the color of active indicator bottombavigationview material You? material3

I want to change the color of the selected area in the bottom navigation view material 3, but the color does not change in any way. I've tried selector, background, background Tint, and styles. All unsuccessfully. Currently like this. It should be…
8
votes
2 answers

Unable to change text emphasis using LocalContentAlpha in Material Design 3

Currently, I am migrating one of my apps to Material Design 3 which is entirely written in Kotlin using Jetpack Compose. While using Material Design 2, I was able to change the emphasis of the text using the code…
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
3 answers

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 surface color mixed with x% of the primary color. Now my question: How can you implement the…
7
votes
2 answers

Detect if Material You is present in device

So, my boss asked me to analyze how to implement Material You colors starting from Android 12. I've been researching for it and every blog of every page about "how to do it" tells you that, you need to hold down at home screen, then go to…
Furkan Yurdakul
  • 2,801
  • 1
  • 15
  • 37
6
votes
2 answers

New Android 12+ MaterialSwitch and androidx.preference

So i'm updating my apps to fully support Monet and Material You guidelines, and the official site mentions a new design for the switches. I used it, and that's the result: I have a preference screen using Androidx preferences library, latest…
6
votes
2 answers

Material Design 3 Top app bar does not have a shadow. How to enable it?

The new 'Material Design 3 top app bar' docs says they got rid of the drop shadow. How can I enable it? Setting elevation on Toolbar or AppBar does not work at all.
4
votes
0 answers

How to use opacity's theme tokens in Material Design 3

During theme's migration process I stuck with opacity's token in Material Design 3. I didn't find any in androidx.compose.material3. I'm looking for something like construction below I was used with Material Design 2 modifier = Modifier.alpha(if…
4
votes
1 answer

How do I theme `NavigationBar()` and `NavigationBarItem()` in Jetpack Compose?

I'm having a terribly hard time trying to change the color(s) of selected/unselected icons and the active indicator. The docs don't have examples or proper Kdocs and I can't seem to find any examples online (please point me to any you know of). The…
4
votes
3 answers

Is it possible to implement Navigation bar using GoRouter Package?

I am trying to implement a NavigationBar using the new Material You API. https://api.flutter.dev/flutter/material/NavigationBar-class.html I was just curious to know if we can implement the same using the Go_Router package .
Abhishek
  • 43
  • 1
  • 6
1
2 3