Skip to content

Commit

Permalink
Merge pull request #7197 from thundernest/simplify_app_icon
Browse files Browse the repository at this point in the history
Use vector drawable for app icon
  • Loading branch information
cketti authored Sep 28, 2023
2 parents 52959a4 + b44d180 commit ce9704b
Show file tree
Hide file tree
Showing 21 changed files with 532 additions and 12 deletions.
Binary file removed app/k9mail/src/debug/res/mipmap-hdpi/icon.png
Binary file not shown.
Binary file removed app/k9mail/src/debug/res/mipmap-mdpi/icon.png
Binary file not shown.
Binary file removed app/k9mail/src/debug/res/mipmap-xhdpi/icon.png
Binary file not shown.
Binary file removed app/k9mail/src/debug/res/mipmap-xxhdpi/icon.png
Binary file not shown.
Binary file removed app/k9mail/src/debug/res/mipmap-xxxhdpi/icon.png
Binary file not shown.
8 changes: 8 additions & 0 deletions app/k9mail/src/debug/res/values/app_logo_colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="app_logo_main">#5917ff</color>
<color name="app_logo_highlight_light">#7a45ff</color>
<color name="app_logo_highlight_dark">#531ad8</color>

<color name="launcher_icon_background">#e3d9ff</color>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected void onAccountSelected(BaseAccount account) {
displayName = account.getEmail();
}
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, displayName);
Parcelable iconResource = Intent.ShortcutIconResource.fromContext(this, R.mipmap.icon);
Parcelable iconResource = Intent.ShortcutIconResource.fromContext(this, R.drawable.ic_launcher);
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconResource);

setResult(RESULT_OK, intent);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/icon_background"/>
<background android:drawable="@color/launcher_icon_background"/>
<foreground>
<inset android:drawable="@mipmap/icon" android:inset="23%"/>
<inset android:drawable="@drawable/ic_app_logo" android:inset="23%"/>
</foreground>
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>
</adaptive-icon>
150 changes: 150 additions & 0 deletions app/ui/legacy/src/main/res/drawable/ic_app_logo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="72dp"
android:height="72dp"
android:viewportWidth="192"
android:viewportHeight="192">
<path
android:fillColor="#607d8b"
android:fillType="evenOdd"
android:pathData="m32,116v12l25.61,38c2.07,3.59 5.94,6 10.39,6h56c4.46,0 8.32,-2.41 10.39,-6h0.01l25.6,-38v-12z"
android:strokeWidth="0.376"
android:strokeColor="#00000000"
android:strokeLineCap="butt"
android:strokeLineJoin="miter" />
<path
android:fillColor="#263238"
android:fillType="nonZero"
android:pathData="M64,16h8v28h-8z"
android:strokeWidth="5.99999952"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#263238"
android:fillType="nonZero"
android:pathData="M120,16h8v28h-8z"
android:strokeWidth="5.99999952"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#4d6570"
android:fillType="nonZero"
android:pathData="m32,127v1l25.61,38c2.07,3.59 5.94,6 10.39,6h56c4.46,0 8.32,-2.41 10.39,-6h0.01l25.6,-38v-1l-25.6,38h-0.01c-2.07,3.59 -5.94,6 -10.39,6h-56c-4.46,0 -8.32,-2.41 -10.39,-6z"
android:strokeWidth="0.34016225"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#607d8b"
android:fillType="nonZero"
android:pathData="M80,14L80,22A6,6 0,0 1,74 28L50,28A6,6 0,0 1,44 22L44,14A6,6 0,0 1,50 8L74,8A6,6 0,0 1,80 14z"
android:strokeWidth="0.34016225"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#607d8b"
android:fillType="nonZero"
android:pathData="M148,14L148,22A6,6 0,0 1,142 28L118,28A6,6 0,0 1,112 22L112,14A6,6 0,0 1,118 8L142,8A6,6 0,0 1,148 14z"
android:strokeWidth="0.34016225"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#4d6570"
android:fillType="nonZero"
android:pathData="m44,21v1c0,3.32 2.68,6 6,6h24c3.32,0 6,-2.68 6,-6v-1c0,3.32 -2.68,6 -6,6h-24c-3.32,0 -6,-2.68 -6,-6z"
android:strokeWidth="0.34016225"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#4d6570"
android:fillType="nonZero"
android:pathData="m112,21v1c0,3.32 2.68,6 6,6h24c3.32,0 6,-2.68 6,-6v-1c0,3.32 -2.68,6 -6,6h-24c-3.32,0 -6,-2.68 -6,-6z"
android:strokeWidth="0.34016225"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#8097a2"
android:fillType="nonZero"
android:pathData="m50,8c-3.32,0 -6,2.68 -6,6v1c0,-3.32 2.68,-6 6,-6h24c3.32,0 6,2.68 6,6v-1c0,-3.32 -2.68,-6 -6,-6z"
android:strokeWidth="0.34016225"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#8097a2"
android:fillType="nonZero"
android:pathData="m118,8c-3.32,0 -6,2.68 -6,6v1c0,-3.32 2.68,-6 6,-6h24c3.32,0 6,2.68 6,6v-1c0,-3.32 -2.68,-6 -6,-6z"
android:strokeWidth="0.34016225"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="@color/app_logo_main"
android:fillType="nonZero"
android:pathData="M172,48L172,116A12,12 0,0 1,160 128L32,128A12,12 0,0 1,20 116L20,48A12,12 0,0 1,32 36L160,36A12,12 0,0 1,172 48z"
android:strokeWidth="0.340162"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#00000000"
android:fillType="evenOdd"
android:pathData="m36,52 l60,32 60,-32"
android:strokeWidth="6"
android:strokeColor="#fbe9e7"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="@color/app_logo_highlight_light"
android:fillType="nonZero"
android:pathData="m32,36c-6.65,0 -12,5.35 -12,12v1c0,-6.65 5.35,-12 12,-12h128c6.65,0 12,5.35 12,12v-1c0,-6.65 -5.35,-12 -12,-12z"
android:strokeWidth="0.340162"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="@color/app_logo_highlight_dark"
android:fillType="nonZero"
android:pathData="m20,115v1c0,6.65 5.35,12 12,12h128c6.65,0 12,-5.35 12,-12v-1c0,6.65 -5.35,12 -12,12h-128c-6.65,0 -12,-5.35 -12,-12z"
android:strokeWidth="0.340162"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#263238"
android:fillType="nonZero"
android:pathData="M108,158L108,170A6,6 0,0 1,102 176L90,176A6,6 0,0 1,84 170L84,158A6,6 0,0 1,90 152L102,152A6,6 0,0 1,108 158z"
android:strokeWidth="0.340162"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#263238"
android:fillType="nonZero"
android:pathData="M96,172m-12,0a12,12 0,1 1,24 0a12,12 0,1 1,-24 0"
android:strokeWidth="9"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#37474f"
android:fillType="nonZero"
android:pathData="m90,152c-3.32,0 -6,2.68 -6,6v1c0,-3.32 2.68,-6 6,-6h12c3.32,0 6,2.68 6,6v-1c0,-3.32 -2.68,-6 -6,-6z"
android:strokeWidth="0.340162"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
<path
android:fillColor="#1a252a"
android:fillType="nonZero"
android:pathData="m84.02,171.43a12,12 0,0 0,-0.02 0.57,12 12,0 0,0 12,12 12,12 0,0 0,12 -12,12 12,0 0,0 -0.02,-0.41 12,12 0,0 1,-11.98 11.41,12 12,0 0,1 -11.98,-11.57z"
android:strokeWidth="9"
android:strokeColor="#00000000"
android:strokeLineCap="round"
android:strokeLineJoin="miter" />
</vector>
2 changes: 1 addition & 1 deletion app/ui/legacy/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:layout_gravity="center"
android:layout_margin="16dp"
android:contentDescription="@null"
app:srcCompat="@mipmap/icon" />
app:srcCompat="@drawable/ic_app_logo" />

<TextView
android:layout_width="match_parent"
Expand Down
Binary file removed app/ui/legacy/src/main/res/mipmap-hdpi/icon.png
Binary file not shown.
Binary file removed app/ui/legacy/src/main/res/mipmap-mdpi/icon.png
Binary file not shown.
Binary file removed app/ui/legacy/src/main/res/mipmap-xhdpi/icon.png
Binary file not shown.
Binary file removed app/ui/legacy/src/main/res/mipmap-xxhdpi/icon.png
Binary file not shown.
Binary file removed app/ui/legacy/src/main/res/mipmap-xxxhdpi/icon.png
Binary file not shown.
4 changes: 0 additions & 4 deletions app/ui/legacy/src/main/res/values-v26/drawables.xml

This file was deleted.

8 changes: 8 additions & 0 deletions app/ui/legacy/src/main/res/values/app_logo_colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="app_logo_main">#ff1744</color>
<color name="app_logo_highlight_light">#ff4569</color>
<color name="app_logo_highlight_dark">#d81a3d</color>

<color name="launcher_icon_background">#ffdae1</color>
</resources>
2 changes: 0 additions & 2 deletions app/ui/legacy/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="icon_background">#FFDAE1</color>

<color name="light_black">#444444</color>

<color name="status_todo_chevron">#888</color>
Expand Down
2 changes: 1 addition & 1 deletion app/ui/legacy/src/main/res/values/drawables.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<drawable name="ic_launcher">@mipmap/icon</drawable>
<drawable name="ic_launcher">@drawable/ic_app_logo</drawable>
</resources>
Loading

0 comments on commit ce9704b

Please sign in to comment.