Reputation: 6089
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?
Upvotes: 17
Views: 1822
Reputation: 15012
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
:
See how dynamic colors shows on API 32 eumlator (sx) and not on API 31 one (dx):
Upvotes: 4
Reputation: 51
you can test material you using an emulator by creating one with the Sv2 system image. see image here
Upvotes: 5
Reputation: 1186
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
Upvotes: 0