Skip to content

Commit

Permalink
add history shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve-Mr committed Apr 11, 2024
1 parent e6b353a commit 2352207
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />

</activity>

<service
Expand Down
19 changes: 19 additions & 0 deletions app/src/main/res/drawable/ic_history_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group android:scaleX="0.42777777"
android:scaleY="0.42777777"
android:translateX="146.48889"
android:translateY="146.48889">
<path
android:pathData="M194,0.7c-19.9,0.7 -63.4,4.9 -76,7.3 -32.9,6.3 -61.5,25.9 -79.1,54.4 -13.5,21.9 -17,38.3 -21.1,97.1 -1.8,26.3 -1.8,160.7 0,187 3.3,47.2 5.9,64.3 12.5,80.4 14.5,35.1 46.2,62.1 83.3,70.6 8.1,1.9 44.1,6.2 62.9,7.4 15.4,1.1 113.5,1.5 113.5,0.6 0,-0.3 -3,-4 -6.6,-8.1 -12.7,-14.6 -21.2,-29.6 -27.4,-48.3 -5.8,-17.5 -7.4,-28.9 -6.7,-48.9 0.8,-24 4.2,-37.5 14.7,-58.7 19.2,-38.5 54.4,-65.3 98,-74.6 14.9,-3.2 40,-3.2 54.7,-0.1 13.7,3 25.7,7.3 38.2,13.8 5.8,3 10.7,5.4 10.9,5.4 0.8,-0 -0.7,-102.5 -1.8,-120 -1.4,-23.5 -3.9,-53.3 -5.1,-61.5 -1.3,-9.3 -7.1,-26.3 -11.9,-35.3 -17.6,-32.7 -48.6,-55.1 -85,-61.6 -12.7,-2.3 -43.3,-5.4 -63.6,-6.6 -15.8,-0.8 -84,-1.1 -104.4,-0.3zM360.6,135.7c9.4,5 14.7,15.9 12.5,25.9 -1.5,6.8 -5.8,12.5 -11.8,16.1l-4.8,2.8 -112.5,0.3c-80.1,0.2 -114,-0 -117.7,-0.8 -6.2,-1.3 -13.7,-7.4 -16.4,-13.5 -3.4,-7.3 -1.9,-18.4 3.3,-24.5 2.5,-3 8.3,-6.8 11.8,-7.8 2.3,-0.7 43.7,-1 117.5,-0.9l114,0.2 4.1,2.2zM264.3,236.4c9.6,3.5 15.7,12.1 15.7,22.4 0,11 -6.9,20.1 -17.5,23.1 -2.7,0.7 -24.4,1.1 -68.1,1.1 -69.4,-0 -69.8,-0 -76.9,-5.4 -1.9,-1.5 -4.7,-4.8 -6.2,-7.3 -2.2,-3.8 -2.7,-5.9 -2.7,-11.2 0,-11.4 6.4,-19.8 17.4,-23.2 1.4,-0.4 32.2,-0.7 68.5,-0.8 52.7,-0 66.8,0.3 69.8,1.3z"
android:fillColor="#ffffff"
android:strokeColor="#00000000"/>
<path
android:pathData="M370.3,299.5c-33.5,6.1 -63.7,29.3 -77.9,60 -19,41.1 -10.5,89.3 21.3,120.8 12.3,12.1 23.4,19.3 38.4,24.8 14,5.1 20.9,6.2 37.9,6.2 13.5,-0 16.7,-0.3 25.1,-2.5 35.6,-9.6 62.6,-33.9 74.9,-67.6 4.9,-13.4 6.3,-23.6 5.7,-40.7 -0.6,-17.1 -2.8,-26.9 -9.7,-41.3 -5.6,-11.7 -10.3,-18.4 -19.8,-28.4 -16.1,-16.7 -36,-27.5 -57.9,-31.3 -10.3,-1.8 -28.1,-1.8 -38,-0zM395.8,330.4l3.7,3.4 0.3,30.6 0.3,30.5 18.4,0.3 18.4,0.3 3.1,3c5.6,5.4 5.7,13.7 0.1,18.7 -4,3.5 -8.9,4.1 -35.2,3.6 -32.3,-0.5 -30.3,2.3 -30.7,-42.8 -0.4,-40.9 -0.2,-43.3 4.5,-47.7 2.9,-2.8 4.2,-3.3 8.4,-3.3 4.2,-0 5.5,0.5 8.7,3.4z"
android:fillColor="#ffffff"
android:strokeColor="#00000000"/>
</group>
</vector>
6 changes: 6 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_history.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_history_background"/>
<foreground android:drawable="@drawable/ic_history_foreground"/>
<monochrome android:drawable="@drawable/ic_history_foreground"/>
</adaptive-icon>
4 changes: 4 additions & 0 deletions app/src/main/res/values/ic_history_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_history_background">#7E57C2</color>
</resources>
15 changes: 15 additions & 0 deletions app/src/main/res/xml/shortcuts.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="compose"
android:enabled="true"
android:icon="@mipmap/ic_history"
android:shortcutShortLabel="@string/history_activity"
android:shortcutLongLabel="@string/history_activity">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="com.maary.shareas"
android:targetClass="com.maary.shareas.activity.HistoryActivity" />
</shortcut>

</shortcuts>

0 comments on commit 2352207

Please sign in to comment.