Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 12- Material You theme not working in emulator

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?

like image 304
Mittal Varsani Avatar asked Sep 09 '21 11:09

Mittal Varsani


People also ask

How do I enable dark mode on my emulator?

Use the system setting (Settings -> Display -> Theme) to enable Dark theme. Use the Quick Settings tile to switch themes from the notification tray (once enabled). On Pixel devices, selecting the Battery Saver mode enables Dark theme at the same time.

Why is my Android Emulator not working?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.

Why is my emulator showing a white screen?

If it's a white screen, it means it is loading. Before it happened to me, and I clicked on the white screen for some times, then it successfully loaded my project. It may be that your Project includes something that the Emulator is incompatible with (an extension for example).

Why is the emulator not showing in Android Studio?

If the emulator fails to launch due to the error vulkan-1. dll cannot be found , you probably need to update the emulator. To update the emulator in Android Studio, go to Tools > SDK Manager and install the latest stable version of Android platform.


Video Answer


2 Answers

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

like image 94
shadowsheep Avatar answered Nov 11 '22 04:11

shadowsheep


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

like image 40
Florian N'Gbala Avatar answered Nov 11 '22 05:11

Florian N'Gbala