Add shortcut to ComposeActivity in debug builds

This commit is contained in:
MM20 2021-12-05 20:49:42 +01:00
parent 602e9d4714
commit 9e3e9161c1
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
5 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,3 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" android:tint="?attr/colorControlNormal">
<path android:fillColor="@android:color/black" android:pathData="M19.8,18.4L14,10.67V6.5l1.35,-1.69C15.61,4.48 15.38,4 14.96,4H9.04C8.62,4 8.39,4.48 8.65,4.81L10,6.5v4.17L4.2,18.4C3.71,19.06 4.18,20 5,20h14C19.82,20 20.29,19.06 19.8,18.4z"/>
</vector>

View File

@ -1,3 +1,4 @@
<resources>
<string name="app_name">Kvæsitso Debug</string>
<string name="shortcut_compose_activity">Compose Activity</string>
</resources>

View File

@ -1,3 +1,4 @@
<resources>
<string name="app_name">Kvæsitso Debug</string>
<string name="shortcut_compose_activity">Compose Activity</string>
</resources>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.mm20.launcher2.ui">
<application>
<activity android:name=".legacy.activity.LauncherActivity">
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/debug_shortcuts" />
</activity>
</application>
</manifest>

View File

@ -0,0 +1,13 @@
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="composeactivity"
android:enabled="true"
android:icon="@drawable/ic_experimental_feature"
android:shortcutShortLabel="@string/shortcut_compose_activity"
android:shortcutLongLabel="@string/shortcut_compose_activity">
<intent
android:action="android.intent.action.MAIN"
android:targetPackage="de.mm20.launcher2.debug"
android:targetClass="de.mm20.launcher2.ui.activity.ComposeActivity" />
</shortcut>
</shortcuts>