Code A is generated automatically by Android Studio.
I hope to replace <background android:drawable="@color/ic_meter_launcher_background"/> with a color value, but both Code B and Code C are wrong.
How can I do?
Code A
ic_launcher.xml file
<?xml version="1.0" encoding="utf-8"?> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <background android:drawable="@color/ic_meter_launcher_background"/> <foreground android:drawable="@drawable/ic_meter_launcher_foreground"/> </adaptive-icon>ic_meter_launcher_background.xml file
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="ic_meter_launcher_background">#3DDC84</color> </resources>
Code B
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/#3DDC84"/>
<foreground android:drawable="@drawable/ic_meter_launcher_foreground"/>
</adaptive-icon>
Code C
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="#3DDC84"/>
<foreground android:drawable="@drawable/ic_meter_launcher_foreground"/>
</adaptive-icon>