Here is a layer-list:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/blue"/>
<item
android:drawable="@mipmap/ic_launcher_foreground"
android:gravity="center"/>
</layer-list>
How do I set the size of the second item? In some devices, it just stretches across the entire screen. I can't use android:width
and android:height
cause they're for API 23 minimum. I tried adding a <shape>
item above it like in this answer here: https://stackoverflow.com/a/46115699/14536109 but it still stretched across the entire screen like before.