Skip to content

Commit

Permalink
Launcher icon and splashscreen: use inset instead of separate drawable.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisguse committed May 29, 2021
1 parent 0ad295a commit 1f33cfe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 38 deletions.
6 changes: 5 additions & 1 deletion src/main/res/drawable-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_logo_color_108dp" />
<foreground>
<inset
android:inset="20dp"
android:drawable="@drawable/ic_logo_color_24dp" />
</foreground>
</adaptive-icon>
6 changes: 5 additions & 1 deletion src/main/res/drawable/ic_launcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
<solid android:color="@color/ic_launcher_background" />
</shape>
</item>
<item android:drawable="@drawable/ic_logo_color_108dp" />
<item>
<inset
android:drawable="@drawable/ic_logo_color_24dp"
android:inset="8dp" />
</item>
</layer-list>
33 changes: 0 additions & 33 deletions src/main/res/drawable/ic_logo_color_108dp.xml

This file was deleted.

9 changes: 6 additions & 3 deletions src/main/res/drawable/splashscreen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
<item
android:width="300dp"
android:height="300dp"
android:drawable="@drawable/ic_logo_color_108dp"
android:gravity="center_vertical|center_horizontal"
tools:targetApi="m" />
android:gravity="center"
tools:targetApi="m">
<inset
android:drawable="@drawable/ic_logo_color_24dp"
android:inset="20dp" />
</item>

</layer-list>

0 comments on commit 1f33cfe

Please sign in to comment.