17

I have created an android 12 emulator to see one of the features that is material you theme

Emulator details are

Name: Pixel 5

CPU: x86_64

the issue is when I change the wallpaper from settings -> wallpaper & style, wallpaper changed but the theme according to the wallpaper color is not applied

So my question is

Is Material You supported in the emulator if yes, then how can I achieve this?

Mittal Varsani
  • 5,601
  • 2
  • 15
  • 27

3 Answers3

5

you can test material you using an emulator by creating one with the Sv2 system image. see image here

  • 2
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/30211591) – Elikill58 Oct 29 '21 at 20:10
4

While Material 3 is working on Android 12 powerd physical devices

https://developer.android.com/about/versions/12/features

If you want to test dynamic colors on an Emulator, you need to use an Android 12L powered emulator.

This is an issue with Android Emulator system image based on API level 31.

In order to install API Level 32 (Android 12L) you can follow this link:

https://developer.android.com/about/versions/12/12L/get#set-up-avd

The image is now called API 32:

enter image description here

See how dynamic colors shows on API 32 eumlator (sx) and not on API 31 one (dx):

enter image description here

enter image description here

shadowsheep
  • 14,048
  • 3
  • 67
  • 77
0

Make sure to use the dynamicLightColorScheme in MaterialTheme

Checkout my sample in how to implement: https://github.com/warting/android-material-you-sample-app/blob/0cd580996ab9468c20c89d10629ae5fc887de398/app/src/main/java/se/warting/examplematerialyou/MainActivity.kt#L65

Wärting
  • 1,086
  • 1
  • 12
  • 19