Skip to content

Commit

Permalink
Added adaptive icons (#64)
Browse files Browse the repository at this point in the history
* Reformatted color values

* Added adaptive icons support (API 26+)
Changed legacy icons to reflect the change
    Added missing round legacy icon
  • Loading branch information
vangyyy authored and kevinhinterlong committed Dec 3, 2019
1 parent af9faf5 commit 26c2325
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 18 deletions.
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<application
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
Expand Down
Binary file added app/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1347.3684"
android:viewportHeight="1347.3684">
<group android:translateX="417.6842"
android:translateY="417.6842">
<path
android:pathData="M255.948,0.004C233.159,55.876 219.414,92.422 194.042,146.633 209.599,163.123 228.693,182.326 259.702,204.014 226.364,190.295 203.624,176.522 186.629,162.23 154.158,229.987 103.284,326.503 0.045,512.002 81.188,465.157 144.087,436.277 202.707,425.257 200.19,414.43 198.759,402.72 198.856,390.501l0.096,-2.599c1.288,-51.986 28.331,-91.963 60.365,-89.248 32.035,2.714 56.935,47.083 55.648,99.068 -0.242,9.782 -1.345,19.192 -3.273,27.92 57.983,11.343 120.211,40.149 200.255,86.36 -15.783,-29.058 -29.871,-55.251 -43.324,-80.198 -21.191,-16.425 -43.295,-37.801 -88.382,-60.943 30.99,8.053 53.179,17.343 70.474,27.728C313.931,143.92 302.854,110.08 255.948,0.004Z"
android:strokeWidth="1.48405087"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="1"/>
</group>
</vector>
19 changes: 9 additions & 10 deletions app/src/main/res/layout/toolbar.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.appbar.AppBarLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.appbar.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -10,10 +9,10 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/wikiHeader"
android:background="@color/colorPrimaryDark"
android:minHeight="?attr/actionBarSize"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay"/>
app:popupTheme="@style/AppTheme.PopupOverlay" />

<FrameLayout
android:layout_width="match_parent"
Expand All @@ -22,18 +21,18 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="5dp"
android:background="@color/wikiBottomBar"
app:layout_scrollFlags="scroll|enterAlways"/>
android:background="@color/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways" />

<ProgressBar
android:id="@+id/progress_bar"
android:theme="@style/AppTheme.LinearProgress"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_gravity="center"
android:layout_height="30dp"
android:visibility="gone"
android:indeterminate="true"/>
android:layout_gravity="center"
android:indeterminate="true"
android:theme="@style/AppTheme.LinearProgress"
android:visibility="gone" />

</FrameLayout>

Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -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="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
@@ -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="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file added app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#0288d1</color>

<color name="colorPrimary">@color/archBlue</color>
<color name="colorPrimaryDark">#272727</color>
<color name="colorAccent">#2196f3</color>
<color name="colorAccent">@color/colorPrimary</color>

<color name="white">#ffffff</color>
<color name="gray">#ccc</color>
<color name="wikiHeader">#333</color>
<color name="wikiBottomBar">#08c</color>
<color name="archBlue">#1793D1</color>
<color name="white">#FFFFFF</color>
<color name="gray">#CCCCCC</color>

</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">@color/archBlue</color>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

<style name="AppTheme.LinearProgress" parent="Theme.AppCompat.Light">
<item name="colorAccent">@color/wikiBottomBar</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:background">@color/white</item>
</style>

Expand Down

0 comments on commit 26c2325

Please sign in to comment.