Skip to content

Commit

Permalink
Add round and adaptive icons for Android 8, implements #593 and #592 (#…
Browse files Browse the repository at this point in the history
…705)

This adds adaptive icons for Android 8 and round icons for older Android versions which use them.
Also the bitmap icons are now moved from drawable to mipmap.
  • Loading branch information
dmfs authored Sep 25, 2018
1 parent cef62e0 commit 139fa2a
Show file tree
Hide file tree
Showing 22 changed files with 50 additions and 8 deletions.
18 changes: 10 additions & 8 deletions opentasks/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
<uses-sdk tools:overrideLibrary="org.dmfs.android.bolts"/>

<application
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:name=".TasksApplication"
android:taskAffinity="org.dmfs.tasks.TaskListActivity"
Expand Down Expand Up @@ -204,7 +205,8 @@
</receiver>

<!-- custom alarm receivers -->
<receiver android:name="org.dmfs.tasks.notification.AlarmBroadcastReceiver"
<receiver
android:name="org.dmfs.tasks.notification.AlarmBroadcastReceiver"
android:permission="">
<intent-filter>
<action android:name="org.dmfs.android.tasks.TASK_DUE"/>
Expand Down Expand Up @@ -351,13 +353,13 @@
android:exported="false"/>

<service
android:name="org.dmfs.tasks.quicksettings.TaskQuickSettingsTile"
android:icon="@drawable/content_edit"
android:label="@string/quicksettingstile_create"
android:description="@string/quicksettingstile_create"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
android:name="org.dmfs.tasks.quicksettings.TaskQuickSettingsTile"
android:icon="@drawable/content_edit"
android:label="@string/quicksettingstile_create"
android:description="@string/quicksettingstile_create"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE" />
<action android:name="android.service.quicksettings.action.QS_TILE"/>
</intent-filter>
</service>

Expand Down
Binary file removed opentasks/src/main/res/drawable-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed opentasks/src/main/res/drawable-ldpi/ic_launcher.png
Binary file not shown.
Binary file removed opentasks/src/main/res/drawable-mdpi/ic_launcher.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
32 changes: 32 additions & 0 deletions opentasks/src/main/res/drawable/ic_opentasks_adaptive_fg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:height="24dp"
android:viewportHeight="28.575"
android:viewportWidth="28.574999"
android:width="24dp">
<path
android:pathData="M17.743,8.467L13.635,12.574L11.394,10.333L9.901,11.827L12.141,14.068L13.635,15.562L14.051,15.977L13.635,16.392L11.77,14.526L11.287,14.526L8.749,17.064L9.514,17.828L9.509,17.828L8.749,18.589L9.509,19.348L9.509,19.349L8.749,20.108L17.26,28.619L28.508,28.619L28.508,19.232L19.237,9.961L17.743,8.467z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#22000000"
android:offset="0.0"/>
<item
android:color="#00000000"
android:offset="1.0"/>
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#ffffff"
android:pathData="m17.743,8.467 l-4.108,4.108 -2.241,-2.241 -1.494,1.494 2.241,2.241 1.494,1.494 1.494,-1.494 4.108,-4.108zM11.287,14.526 L8.749,17.063L19.826,17.063l-2.538,-2.537h-1.787l-1.866,1.866 -1.866,-1.866zM9.51,17.828 L8.749,18.588L19.826,18.588l-0.76,-0.76zM9.51,19.348 L8.749,20.108L19.826,20.108l-0.76,-0.76z"
android:strokeColor="#00000000"
android:strokeWidth="1"/>
</vector>
4 changes: 4 additions & 0 deletions opentasks/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/primary"/>
<foreground android:drawable="@drawable/ic_opentasks_adaptive_fg"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/primary"/>
<foreground android:drawable="@drawable/ic_opentasks_adaptive_fg"/>
</adaptive-icon>
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.
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.
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.
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.
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.
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.

0 comments on commit 139fa2a

Please sign in to comment.