Redo icon as adaptive icon
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 29 KiB |
BIN
app/src/main/ic_launcher_test-web.png
Normal file
After Width: | Height: | Size: 27 KiB |
|
@ -22,6 +22,7 @@ import android.annotation.TargetApi;
|
|||
import android.app.ActivityManager;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
|
@ -69,15 +70,7 @@ public abstract class ThemedActivity extends AppCompatActivity {
|
|||
*/
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
private void updateRecentAppColor() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
BitmapDrawable drawable = ((BitmapDrawable) getDrawable(R.drawable.ic_launcher));
|
||||
if (drawable != null) {
|
||||
setTaskDescription(new ActivityManager.TaskDescription(
|
||||
getResources().getString(R.string.app_name),
|
||||
drawable.getBitmap(),
|
||||
getAppSettings().getPrimaryColor()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void updateScreenRotation() {
|
||||
|
|
5
app/src/main/res/drawable-anydpi-v26/ic_launcher.xml
Normal 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_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
|
@ -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_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
|
@ -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_test_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_test_foreground"/>
|
||||
</adaptive-icon>
|
|
@ -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_test_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_test_foreground"/>
|
||||
</adaptive-icon>
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_launcher_test_round.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 929 B After Width: | Height: | Size: 2 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_launcher_test_round.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 4.5 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_launcher_test_round.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 6.9 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 6 KiB After Width: | Height: | Size: 6.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_launcher_test_round.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 9.1 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_launcher_test_round.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
9
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:pathData="M0.025,-0.07h19.95v20.14H0.025z"
|
||||
android:fillColor="#207BE6"/>
|
||||
</vector>
|
12
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="36.363636"
|
||||
android:viewportHeight="36.363636">
|
||||
<group android:translateX="8.181818"
|
||||
android:translateY="8.181818">
|
||||
<path
|
||||
android:pathData="M11.337,14.123l-0.963,-1.345c-0.257,-0.36 -0.466,-0.64 -0.477,-0.64 -0.012,0 -0.416,0.544 -0.958,1.287a83.9,83.9 0,0 1,-0.947 1.287c-0.015,0 -1.86,-1.3 -1.865,-1.313 -0.002,-0.007 0.415,-0.62 0.927,-1.361 0.512,-0.742 0.931,-1.36 0.931,-1.375 0,-0.023 -0.166,-0.081 -1.468,-0.515l-1.485,-0.496c-0.013,-0.005 0.063,-0.263 0.327,-1.094 0.19,-0.599 0.349,-1.093 0.354,-1.099 0.005,-0.006 0.707,0.219 1.56,0.5 0.852,0.28 1.556,0.509 1.565,0.509 0.008,0 0.018,-0.013 0.022,-0.03 0.003,-0.015 0.01,-0.74 0.016,-1.612 0.006,-0.87 0.015,-1.59 0.02,-1.6 0.009,-0.012 0.248,-0.015 1.127,-0.015 0.614,0 1.123,0.004 1.13,0.01 0.01,0.006 0.027,0.485 0.056,1.56 0.046,1.766 0.047,1.79 0.075,1.79 0.01,0 0.686,-0.226 1.501,-0.503a50.795,50.795 0,0 1,1.49 -0.492c0.016,0.019 0.685,2.194 0.676,2.202 -0.004,0.005 -0.684,0.237 -1.51,0.517 -1.137,0.386 -1.504,0.515 -1.507,0.531 -0.003,0.012 0.388,0.597 0.886,1.324 0.49,0.716 0.888,1.308 0.886,1.314a96.945,96.945 0,0 1,-1.852 1.364c-0.006,0 -0.239,-0.317 -0.517,-0.705z"
|
||||
android:fillColor="#fafafa"/>
|
||||
</group>
|
||||
</vector>
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:pathData="M0.025,-0.07h19.95v20.14H0.025z"
|
||||
android:fillColor="#492600"/>
|
||||
</vector>
|
12
app/src/main/res/drawable/ic_launcher_test_foreground.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="36.363636"
|
||||
android:viewportHeight="36.363636">
|
||||
<group android:translateX="8.181818"
|
||||
android:translateY="8.181818">
|
||||
<path
|
||||
android:pathData="M11.337,14.123l-0.963,-1.345c-0.257,-0.36 -0.466,-0.64 -0.477,-0.64 -0.012,0 -0.416,0.544 -0.958,1.287a83.9,83.9 0,0 1,-0.947 1.287c-0.015,0 -1.86,-1.3 -1.865,-1.313 -0.002,-0.007 0.415,-0.62 0.927,-1.361 0.512,-0.742 0.931,-1.36 0.931,-1.375 0,-0.023 -0.166,-0.081 -1.468,-0.515l-1.485,-0.496c-0.013,-0.005 0.063,-0.263 0.327,-1.094 0.19,-0.599 0.349,-1.093 0.354,-1.099 0.005,-0.006 0.707,0.219 1.56,0.5 0.852,0.28 1.556,0.509 1.565,0.509 0.008,0 0.018,-0.013 0.022,-0.03 0.003,-0.015 0.01,-0.74 0.016,-1.612 0.006,-0.87 0.015,-1.59 0.02,-1.6 0.009,-0.012 0.248,-0.015 1.127,-0.015 0.614,0 1.123,0.004 1.13,0.01 0.01,0.006 0.027,0.485 0.056,1.56 0.046,1.766 0.047,1.79 0.075,1.79 0.01,0 0.686,-0.226 1.501,-0.503a50.795,50.795 0,0 1,1.49 -0.492c0.016,0.019 0.685,2.194 0.676,2.202 -0.004,0.005 -0.684,0.237 -1.51,0.517 -1.137,0.386 -1.504,0.515 -1.507,0.531 -0.003,0.012 0.388,0.597 0.886,1.324 0.49,0.716 0.888,1.308 0.886,1.314a96.945,96.945 0,0 1,-1.852 1.364c-0.006,0 -0.239,-0.317 -0.517,-0.705z"
|
||||
android:fillColor="#fafafa"/>
|
||||
</group>
|
||||
</vector>
|