Add shortcut to ComposeActivity in debug builds
This commit is contained in:
parent
602e9d4714
commit
9e3e9161c1
3
base/src/main/res/drawable/ic_experimental_feature.xml
Normal file
3
base/src/main/res/drawable/ic_experimental_feature.xml
Normal 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>
|
||||
@ -1,3 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">Kvæsitso Debug</string>
|
||||
<string name="shortcut_compose_activity">Compose Activity</string>
|
||||
</resources>
|
||||
@ -1,3 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">Kvæsitso Debug</string>
|
||||
<string name="shortcut_compose_activity">Compose Activity</string>
|
||||
</resources>
|
||||
15
ui/src/debug/AndroidManifest.xml
Normal file
15
ui/src/debug/AndroidManifest.xml
Normal 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>
|
||||
13
ui/src/debug/res/xml-v25/debug_shortcuts.xml
Normal file
13
ui/src/debug/res/xml-v25/debug_shortcuts.xml
Normal 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>
|
||||
Loading…
x
Reference in New Issue
Block a user