add shortcut to ComposeActivity (#1147)

main
Konrad Pozniak 6 years ago committed by GitHub
parent 0bf1685db4
commit 26b10fa68b
  1. BIN
      app/src/blue/res/mipmap-hdpi/ic_shortcut_compose.png
  2. BIN
      app/src/blue/res/mipmap-mdpi/ic_shortcut_compose.png
  3. BIN
      app/src/blue/res/mipmap-xhdpi/ic_shortcut_compose.png
  4. BIN
      app/src/blue/res/mipmap-xxhdpi/ic_shortcut_compose.png
  5. BIN
      app/src/blue/res/mipmap-xxxhdpi/ic_shortcut_compose.png
  6. 20
      app/src/blue/res/xml-v25/shortcuts.xml
  7. BIN
      app/src/green/res/mipmap-hdpi/ic_shortcut_compose.png
  8. BIN
      app/src/green/res/mipmap-mdpi/ic_shortcut_compose.png
  9. BIN
      app/src/green/res/mipmap-xhdpi/ic_shortcut_compose.png
  10. BIN
      app/src/green/res/mipmap-xxhdpi/ic_shortcut_compose.png
  11. BIN
      app/src/green/res/mipmap-xxxhdpi/ic_shortcut_compose.png
  12. 20
      app/src/green/res/xml-v25/shortcuts.xml
  13. 3
      app/src/main/AndroidManifest.xml
  14. 2
      app/src/main/res/drawable/ic_create_24dp.xml
  15. 9
      app/src/main/res/mipmap-anydpi-v26/ic_shortcut_compose.xml
  16. 2
      app/src/main/res/values/strings.xml

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:icon="@mipmap/ic_shortcut_compose"
android:shortcutId="com.keylesspalace.tusky.Compose"
android:shortcutLongLabel="@string/compose_shortcut_long_label"
android:shortcutShortLabel="@string/compose_shortcut_short_label">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="com.keylesspalace.tusky.SplashActivity"
android:targetPackage="com.keylesspalace.tusky"/>
<intent
android:action="com.keylesspalace.tusky.Compose"
android:targetClass="com.keylesspalace.tusky.ComposeActivity"
android:targetPackage="com.keylesspalace.tusky"/>
</shortcut>
</shortcuts>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:icon="@mipmap/ic_shortcut_compose"
android:shortcutId="com.keylesspalace.tusky.Compose"
android:shortcutLongLabel="@string/compose_shortcut_long_label"
android:shortcutShortLabel="@string/compose_shortcut_short_label">
<intent
android:action="android.intent.action.VIEW"
android:targetClass="com.keylesspalace.tusky.SplashActivity"
android:targetPackage="com.keylesspalace.tusky.test"/>
<intent
android:action="com.keylesspalace.tusky.Compose"
android:targetClass="com.keylesspalace.tusky.ComposeActivity"
android:targetPackage="com.keylesspalace.tusky.test"/>
</shortcut>
</shortcuts>

@ -26,6 +26,9 @@
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts"/>
</activity> </activity>
<activity <activity
android:name=".SavedTootActivity" android:name=".SavedTootActivity"

@ -4,6 +4,6 @@
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path
android:fillColor="@color/toolbar_icon_dark" android:fillColor="@color/white"
android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/> android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
</vector> </vector>

@ -0,0 +1,9 @@
<?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>
<inset
android:inset="28%"
android:drawable="@drawable/ic_create_24dp" />
</foreground>
</adaptive-icon>

@ -461,5 +461,7 @@
<string name="edit_hashtag_hint">Hashtag without #</string> <string name="edit_hashtag_hint">Hashtag without #</string>
<string name="hashtag">Hashtag</string> <string name="hashtag">Hashtag</string>
<string name="compose_shortcut_long_label">Compose Toot</string>
<string name="compose_shortcut_short_label">Compose</string>
</resources> </resources>

Loading…
Cancel
Save