Skip to content

Commit 34b9281

Browse files
authored
Merge pull request #4059 from StoDevX/android-adaptive
🖼 Implement Android's "Adaptive Icons"
2 parents d3071f7 + 68959ec commit 34b9281

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
2+
android:viewportWidth="512"
3+
android:viewportHeight="512"
4+
android:width="512dp"
5+
android:height="512dp">
6+
<path
7+
android:pathData="M0 0H512V512H0V0Z"
8+
android:fillType="evenOdd">
9+
<aapt:attr
10+
name="android:fillColor">
11+
<gradient
12+
android:startX="256"
13+
android:endX="256"
14+
android:endY="512"
15+
android:tileMode="clamp">
16+
<item
17+
android:color="#F7C55A"
18+
android:offset="0" />
19+
<item
20+
android:color="#E4A01B"
21+
android:offset="0.6779719" />
22+
<item
23+
android:color="#9B5F22"
24+
android:offset="1" />
25+
</gradient>
26+
</aapt:attr>
27+
</path>
28+
</vector>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
2+
android:viewportWidth="512"
3+
android:viewportHeight="512"
4+
android:width="512dp"
5+
android:height="512dp">
6+
<group
7+
android:translateX="115"
8+
android:translateY="155">
9+
<group
10+
android:translateX="121">
11+
<path
12+
android:pathData="M-0.5 -0.5H20.41111V11.85109H-0.5V-0.5Z"
13+
android:fillType="evenOdd"
14+
android:fillColor="#000000"
15+
android:strokeColor="#000000"
16+
android:strokeWidth="1" />
17+
<path
18+
android:pathData="M19.9111111 11.3510896L19.9111111 43.9854722"
19+
android:strokeColor="#000000"
20+
android:strokeWidth="2"
21+
android:strokeLineCap="square" />
22+
<path
23+
android:pathData="M17.77778 37.60048H22.04444V293H17.77778V37.60048Z"
24+
android:fillType="evenOdd"
25+
android:fillColor="#000000" />
26+
<path
27+
android:pathData="M16.35556 51.78935H23.46667V292.2906H16.35556V51.78935Z"
28+
android:fillType="evenOdd"
29+
android:fillColor="#000000" />
30+
<path
31+
android:pathData="M7.822222 61.01211H32V292.2906H7.822222V61.01211Z"
32+
android:fillType="evenOdd"
33+
android:fillColor="#000000" />
34+
</group>
35+
<group
36+
android:translateY="37">
37+
<path
38+
android:pathData="M141 0L135.205479 23.0943396 128.445205 23.0943396 118.787671 52.9245283 114.924658 52.9245283 109.130137 68.3207547 107.19863 68.3207547 107.19863 76.9811321 109.130137 76.9811321 109.130137 87.5660377 105.267123 87.5660377 105.267123 105.849057 109.130137 105.849057 109.130137 144.339623 42.4931507 144.339623 32.8356164 108.735849 19.3150685 108.735849 8.69178082 144.339623 3.8630137 144.339623 3.8630137 157.811321 0 170.320755 1.93150685 170.320755 1.93150685 255 141 255Z"
39+
android:fillType="evenOdd"
40+
android:fillColor="#000000" />
41+
</group>
42+
<group
43+
android:rotation="-0"
44+
android:scaleX="-1"
45+
android:translateX="282"
46+
android:translateY="37">
47+
<path
48+
android:pathData="M141 0L135.205479 23.0943396 128.445205 23.0943396 118.787671 52.9245283 114.924658 52.9245283 109.130137 68.3207547 107.19863 68.3207547 107.19863 76.9811321 109.130137 76.9811321 109.130137 87.5660377 105.267123 87.5660377 105.267123 105.849057 109.130137 105.849057 109.130137 144.339623 42.4931507 144.339623 32.8356164 108.735849 19.3150685 108.735849 8.69178082 144.339623 3.8630137 144.339623 3.8630137 157.811321 0 170.320755 1.93150685 170.320755 1.93150685 255 141 255Z"
49+
android:fillType="evenOdd"
50+
android:fillColor="#000000" />
51+
</group>
52+
</group>
53+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@drawable/ic_launcher_background" />
4+
<foreground android:drawable="@drawable/ic_launcher_foreground" />
5+
</adaptive-icon>

0 commit comments

Comments
 (0)