[#20] Add launcher icon

This commit is contained in:
Carter Jernigan 2021-12-02 15:16:20 -05:00 committed by GitHub
parent 8e9f8037c7
commit d10ff6eb46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 136 additions and 221 deletions

View File

@ -6,11 +6,7 @@
<application
android:name="cash.z.ecc.app.AppImpl"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MyApplication">
android:label="@string/app_name">
<!-- Alias acts as the entrypoint to the application.
Using an alias ensures we can refactor the actual Activity without breaking

View File

@ -1,31 +0,0 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
android:width="108dp">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>

View File

@ -1,171 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
android:width="108dp">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon
xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,22 @@
The launcher icon uses different assets on different Android versions, and therefore needs to be explicitly tested.
# API 25 or lower - API 25 and lower use a traditional square icon
1. Install the app
1. Look at the icon on the home screen
1. Verify that a traditional light-themed square icon is displayed
# API 26 or greater - API 26 adds support for adaptive icons
1. Install the app
1. Look at the app icon on the home screen
1. Verify that a round icon is displayed (most emulator images use round icons)
# API 29 or greater - API 29 adds support for dark mode
1. Set the system to light theme
1. Install the app
1. Look at the app icon on the home screen
1. Verify that a round icon is displayed (most emulator images use round icons)
1. Verify that the icon has a light grey background
1. Set the system theme to dark theme
1. Look at the app icon on the home screen
1. Verify that a round icon is displayed (most emulator images use round icons)
1. Verify that the icon has a dark blue background (Note: it may require rebooting or opening an app and returning to the home screen for the home screen to reset its cache of app icons. This behavior is not a bug in our app, but rather an Android limitation).

View File

@ -3,8 +3,11 @@
xmlns:android="http://schemas.android.com/apk/res/android"
package="cash.z.ecc.ui">
<application>
<application
android:icon="@mipmap/ic_launcher_square"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MaterialComponents.DayNight">
<activity
android:name="cash.z.ecc.ui.MainActivity"
android:label="@string/app_name"

View File

@ -0,0 +1,28 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.2109375"
android:scaleY="0.2109375">
<group>
<clip-path
android:pathData="M0,0h512v512h-512z"/>
<path
android:pathData="M0,0h512v512h-512z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="0"
android:startX="256"
android:endY="512"
android:endX="256"
android:type="linear">
<item android:offset="0" android:color="#FF273458"/>
<item android:offset="1" android:color="#FF223054"/>
</gradient>
</aapt:attr>
</path>
</group>
</group>
</vector>

View File

@ -0,0 +1,21 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.17085938"
android:scaleY="0.17085938"
android:translateX="10.26"
android:translateY="10.26">
<group>
<clip-path
android:pathData="M0,0h512v512h-512z"/>
<path
android:pathData="M329.484,191.772v-31.411L273.236,160.361v-34.522L238.716,125.839v34.522L182.516,160.361v41.6h87.157l-71.251,98.1L182.516,320.226v31.411L238.716,351.637v34.421h4.165v0.1h26.242v-0.1h4.115v-34.421h56.248v-41.6L242.327,310.037l71.251,-98.1Z"
android:fillColor="#f4b728"/>
<path
android:fillColor="#FF000000"
android:pathData="M238.716,125.841v34.522L182.516,160.363v41.6h87.157l-71.251,98.1L182.516,320.226v31.411L238.716,351.637v34.421h4.165v0.1h26.242v-0.1h4.115v-34.421h56.248v-41.6L242.327,310.037l71.251,-98.1L329.484,191.772v-31.411L273.236,160.361v-34.522L238.716,125.839m0,-8L273.236,117.839a8,8 0,0 1,8 8v26.522h48.248a8,8 0,0 1,8 8L337.484,191.772a8,8 0,0 1,-1.718 4.954l-15.906,20.171 -61.836,85.142h71.46a8,8 0,0 1,8 8v41.6a8,8 0,0 1,-8 8L281.236,359.639v26.421a8,8 0,0 1,-8 8h-2.861a7.861,7.861 0,0 1,-1.254 0.1L242.879,394.16a8.065,8.065 0,0 1,-1.271 -0.1L238.716,394.06a8,8 0,0 1,-8 -8v-26.421L182.516,359.639a8,8 0,0 1,-8 -8v-31.411a8,8 0,0 1,1.718 -4.954l15.906,-20.171L253.976,209.959L182.516,209.959a8,8 0,0 1,-8 -8v-41.6a8,8 0,0 1,8 -8L230.716,152.359v-26.522A8,8 0,0 1,238.716 117.841Z"/>
</group>
</group>
</vector>

View File

@ -0,0 +1,28 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.2109375"
android:scaleY="0.2109375">
<group>
<clip-path
android:pathData="M0,0h512v512h-512z"/>
<path
android:pathData="M0,0h512v512h-512z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="0"
android:startX="256"
android:endY="512"
android:endX="256"
android:type="linear">
<item android:offset="0" android:color="#FFECF4FB"/>
<item android:offset="1" android:color="#FFD5E6F4"/>
</gradient>
</aapt:attr>
</path>
</group>
</group>
</vector>

View File

@ -0,0 +1,21 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.17085938"
android:scaleY="0.17085938"
android:translateX="10.26"
android:translateY="10.26">
<group>
<clip-path
android:pathData="M0,0h512v512h-512z"/>
<path
android:pathData="M329.484,191.772v-31.411L273.236,160.361v-34.522L238.716,125.839v34.522L182.516,160.361v41.6h87.157l-71.251,98.1L182.516,320.226v31.411L238.716,351.637v34.421h4.165v0.1h26.242v-0.1h4.115v-34.421h56.248v-41.6L242.327,310.037l71.251,-98.1Z"
android:fillColor="#f4b728"/>
<path
android:pathData="M238.716,125.841v34.522L182.516,160.363v41.6h87.157l-71.251,98.1L182.516,320.226v31.411L238.716,351.637v34.421h4.165v0.1h26.242v-0.1h4.115v-34.421h56.248v-41.6L242.327,310.037l71.251,-98.1L329.484,191.772v-31.411L273.236,160.361v-34.522L238.716,125.839m0,-8L273.236,117.839a8,8 0,0 1,8 8v26.522h48.248a8,8 0,0 1,8 8L337.484,191.772a8,8 0,0 1,-1.718 4.954l-15.906,20.171 -61.836,85.142h71.46a8,8 0,0 1,8 8v41.6a8,8 0,0 1,-8 8L281.236,359.639v26.421a8,8 0,0 1,-8 8h-2.861a7.861,7.861 0,0 1,-1.254 0.1L242.879,394.16a8.065,8.065 0,0 1,-1.271 -0.1L238.716,394.06a8,8 0,0 1,-8 -8v-26.421L182.516,359.639a8,8 0,0 1,-8 -8v-31.411a8,8 0,0 1,1.718 -4.954l15.906,-20.171L253.976,209.959L182.516,209.959a8,8 0,0 1,-8 -8v-41.6a8,8 0,0 1,8 -8L230.716,152.359v-26.522A8,8 0,0 1,238.716 117.841Z"
android:fillColor="#fff"/>
</group>
</group>
</vector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_adaptive_background"/>
<foreground android:drawable="@drawable/ic_launcher_adaptive_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_adaptive_background"/>
<foreground android:drawable="@drawable/ic_launcher_adaptive_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB