mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-25 06:16:15 +03:00
Fix #197 Shortcuts for Android 7
Added a shortcut to create a new note for Android 7 and above.
This commit is contained in:
parent
bc4a3f2aac
commit
68aaae4d72
8 changed files with 21 additions and 2 deletions
|
@ -11,8 +11,8 @@
|
|||
android:fullBackupContent="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/OwnCloud">
|
||||
|
||||
<activity
|
||||
|
@ -31,6 +31,8 @@
|
|||
<meta-data
|
||||
android:name="android.app.default_searchable"
|
||||
android:value="it.niedermann.owncloud.notes.android.activity.NotesListViewActivity" />
|
||||
<meta-data android:name="android.app.shortcuts"
|
||||
android:resource="@xml/shortcuts" />
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
|
|
BIN
app/src/main/res/drawable-hdpi/ic_action_new_theme.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_action_new_theme.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 285 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_new_theme.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_action_new_theme.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 203 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_new_theme.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_action_new_theme.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 274 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_new_theme.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_action_new_theme.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 358 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_action_new_theme.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_action_new_theme.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 457 B |
|
@ -100,10 +100,12 @@
|
|||
<string name="widget_all_notes_title">All notes</string>
|
||||
<string name="widget_single_note_title">Single note</string>
|
||||
|
||||
<!-- Shortcuts -->
|
||||
<string name="shortcut_create_long">Create a new note</string>
|
||||
|
||||
<!-- Plurals -->
|
||||
<plurals name="ab_selected">
|
||||
<item quantity="one">%d selected</item>
|
||||
<item quantity="other">%d selected</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
</resources>
|
15
app/src/main/res/xml/shortcuts.xml
Normal file
15
app/src/main/res/xml/shortcuts.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<shortcut
|
||||
android:shortcutId="it.niedermann.owncloud.notes"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/ic_action_new_theme"
|
||||
android:shortcutShortLabel="@string/action_create"
|
||||
android:shortcutLongLabel="@string/shortcut_create_long">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:targetPackage="it.niedermann.owncloud.notes"
|
||||
android:targetClass="it.niedermann.owncloud.notes.android.activity.CreateNoteActivity" />
|
||||
<categories android:name="android.shortcut.conversation" />
|
||||
</shortcut>
|
||||
</shortcuts>
|
Loading…
Reference in a new issue