Skip to content

Commit

Permalink
Support Android 5.0 and change launcher icon.
Browse files Browse the repository at this point in the history
The size will increase too much if support Android 4.0
  • Loading branch information
JingMatrix committed May 2, 2023
1 parent 753d704 commit 332b855
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 38 deletions.
9 changes: 7 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {

defaultConfig {
applicationId = "org.matrix.chromext"
minSdk = 26
minSdk = 21
targetSdk = 33
versionCode = 6
versionName = "3.0.0"
Expand All @@ -34,7 +34,12 @@ android {
}

lintOptions {
disable("Internationalization", "UnsafeIntentLaunch", "UnspecifiedRegisterReceiverFlag")
disable(
"Internationalization",
"UnsafeIntentLaunch",
"UnspecifiedRegisterReceiverFlag",
"VectorPath",
"Usability:Icons")
}

kotlinOptions { jvmTarget = JavaVersion.VERSION_18.toString() }
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_chrome.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/black"
android:pathData="M12 20l3.46-6h-0.01c0.34-0.6 0.55 -1.27 0.55 -2c0-1.2-0.54-2.27-1.38-3h4.79c0.38 0.93 0.59 1.94 0.59 3a8 8 0 0 1-8 8m-8-8c0-1.46 0.39 -2.82 1.07-4l3.47 6h0.01c0.69 1.19 1.95 2 3.45 2c0.45 0 0.88-0.09 1.29-0.23l-2.4 4.14C7 19.37 4 16.04 4 12m11 0a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3a3 3 0 0 1 3 3m-3-8a7.98 7.98 0 0 1 6.92 4H12c-1.94 0-3.55 1.38-3.92 3.21L5.7 7.08A7.981 7.981 0 0 1 12 4m0-2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2Z" />
</vector>
25 changes: 0 additions & 25 deletions app/src/main/res/drawable/themed_app_icon.xml

This file was deleted.

Binary file removed app/src/main/res/mipmap-hdpi/layered_app_icon.png
Binary file not shown.
14 changes: 14 additions & 0 deletions app/src/main/res/mipmap-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>

<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android" >
<background android:drawable="@android:color/white"/>
<foreground >
<inset
android:drawable="@drawable/ic_chrome"
android:insetTop="7.2dp"
android:insetBottom="7.2dp"
android:insetLeft="7.2dp"
android:insetRight="7.2dp"
/>
</foreground >
</adaptive-icon>
13 changes: 2 additions & 11 deletions app/src/main/res/mipmap/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2022 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android" >
<background android:drawable="@android:color/transparent"/>
<foreground android:drawable="@mipmap/layered_app_icon"/>
<monochrome android:drawable="@drawable/themed_app_icon"/>
</adaptive-icon>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_chrome" />

0 comments on commit 332b855

Please sign in to comment.