Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com>2017-04-09 16:45:33 +0300
committerGitHub <noreply@github.com>2017-04-09 16:45:33 +0300
commit68aaae4d729398dcf6d732bfa62123b665b71fa1 (patch)
treee5c074f3340134380c6203330a800eb5aeaf68df /app/src/main/res
parentbc4a3f2aac1d9799333d721c46ea91a81f4d7b23 (diff)
Fix #197 Shortcuts for Android 7
Added a shortcut to create a new note for Android 7 and above.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable-hdpi/ic_action_new_theme.pngbin0 -> 285 bytes
-rw-r--r--app/src/main/res/drawable-mdpi/ic_action_new_theme.pngbin0 -> 203 bytes
-rw-r--r--app/src/main/res/drawable-xhdpi/ic_action_new_theme.pngbin0 -> 274 bytes
-rw-r--r--app/src/main/res/drawable-xxhdpi/ic_action_new_theme.pngbin0 -> 358 bytes
-rw-r--r--app/src/main/res/drawable-xxxhdpi/ic_action_new_theme.pngbin0 -> 457 bytes
-rw-r--r--app/src/main/res/values/strings.xml4
-rw-r--r--app/src/main/res/xml/shortcuts.xml15
7 files changed, 18 insertions, 1 deletions
diff --git a/app/src/main/res/drawable-hdpi/ic_action_new_theme.png b/app/src/main/res/drawable-hdpi/ic_action_new_theme.png
new file mode 100644
index 00000000..ad8f7365
--- /dev/null
+++ b/app/src/main/res/drawable-hdpi/ic_action_new_theme.png
Binary files differ
diff --git a/app/src/main/res/drawable-mdpi/ic_action_new_theme.png b/app/src/main/res/drawable-mdpi/ic_action_new_theme.png
new file mode 100644
index 00000000..1130984a
--- /dev/null
+++ b/app/src/main/res/drawable-mdpi/ic_action_new_theme.png
Binary files differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_action_new_theme.png b/app/src/main/res/drawable-xhdpi/ic_action_new_theme.png
new file mode 100644
index 00000000..0ab1a5a4
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/ic_action_new_theme.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_action_new_theme.png b/app/src/main/res/drawable-xxhdpi/ic_action_new_theme.png
new file mode 100644
index 00000000..99b88117
--- /dev/null
+++ b/app/src/main/res/drawable-xxhdpi/ic_action_new_theme.png
Binary files differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_action_new_theme.png b/app/src/main/res/drawable-xxxhdpi/ic_action_new_theme.png
new file mode 100644
index 00000000..9f2f56c4
--- /dev/null
+++ b/app/src/main/res/drawable-xxxhdpi/ic_action_new_theme.png
Binary files differ
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3a3b70f4..31e1457c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -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> \ No newline at end of file
diff --git a/app/src/main/res/xml/shortcuts.xml b/app/src/main/res/xml/shortcuts.xml
new file mode 100644
index 00000000..1e5b0179
--- /dev/null
+++ b/app/src/main/res/xml/shortcuts.xml
@@ -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> \ No newline at end of file