diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2015-11-13 11:10:12 +0100 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2015-11-13 11:40:34 +0100 |
commit | 8908920488f514e015610d21f00481857c08776f (patch) | |
tree | 96da2ea2b0555b1a398568938d486fac66d06155 /android | |
parent | 6636476cf06ccabc81fcc951f842a34a7f4b5840 (diff) |
android: add undo/redo to the main toolbar
Change-Id: I64f76d22018fcd8af2991933ba5ab2069f84181f
Diffstat (limited to 'android')
-rw-r--r-- | android/source/res/drawable-xxxhdpi/ic_redo_black_24dp.png | bin | 0 -> 615 bytes | |||
-rw-r--r-- | android/source/res/drawable-xxxhdpi/ic_undo_black_24dp.png | bin | 0 -> 601 bytes | |||
-rw-r--r-- | android/source/res/drawable/ic_redo.xml | 5 | ||||
-rw-r--r-- | android/source/res/drawable/ic_undo.xml | 5 | ||||
-rw-r--r-- | android/source/res/menu/main.xml | 12 | ||||
-rw-r--r-- | android/source/res/values/strings.xml | 3 | ||||
-rw-r--r-- | android/source/src/java/org/libreoffice/ToolbarController.java | 6 |
7 files changed, 31 insertions, 0 deletions
diff --git a/android/source/res/drawable-xxxhdpi/ic_redo_black_24dp.png b/android/source/res/drawable-xxxhdpi/ic_redo_black_24dp.png Binary files differnew file mode 100644 index 000000000000..40f107549cd7 --- /dev/null +++ b/android/source/res/drawable-xxxhdpi/ic_redo_black_24dp.png diff --git a/android/source/res/drawable-xxxhdpi/ic_undo_black_24dp.png b/android/source/res/drawable-xxxhdpi/ic_undo_black_24dp.png Binary files differnew file mode 100644 index 000000000000..9ca7eb73e65d --- /dev/null +++ b/android/source/res/drawable-xxxhdpi/ic_undo_black_24dp.png diff --git a/android/source/res/drawable/ic_redo.xml b/android/source/res/drawable/ic_redo.xml new file mode 100644 index 000000000000..eb4abef0a314 --- /dev/null +++ b/android/source/res/drawable/ic_redo.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> + +<bitmap xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/ic_redo_black_24dp" + android:tint="@color/toolbar_forgeround"/>
\ No newline at end of file diff --git a/android/source/res/drawable/ic_undo.xml b/android/source/res/drawable/ic_undo.xml new file mode 100644 index 000000000000..12b9ce6f249b --- /dev/null +++ b/android/source/res/drawable/ic_undo.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> + +<bitmap xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@drawable/ic_undo_black_24dp" + android:tint="@color/toolbar_forgeround"/>
\ No newline at end of file diff --git a/android/source/res/menu/main.xml b/android/source/res/menu/main.xml index d000be8fe69c..3ec0dadc5b63 100644 --- a/android/source/res/menu/main.xml +++ b/android/source/res/menu/main.xml @@ -7,6 +7,18 @@ tools:visible="true" android:visible="false"> + <item android:id="@+id/action_undo" + android:title="@string/action_undo" + android:icon="@drawable/ic_undo" + android:orderInCategory="100" + app:showAsAction="always"/> + + <item android:id="@+id/action_redo" + android:title="@string/action_redo" + android:icon="@drawable/ic_redo" + android:orderInCategory="100" + app:showAsAction="always"/> + <item android:id="@+id/action_keyboard" android:title="@string/action_keyboard" android:icon="@drawable/ic_keyboard" diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml index 9340b3283be6..403f5b900c3f 100644 --- a/android/source/res/values/strings.xml +++ b/android/source/res/values/strings.xml @@ -79,5 +79,8 @@ <string name="server_url_and_port">URL and port of the ownCloud server.</string> <string name="user_name">User name</string> <string name="password">Password</string> + <string name="action_undo">Undo</string> + <string name="action_redo">Redo</string> + </resources> diff --git a/android/source/src/java/org/libreoffice/ToolbarController.java b/android/source/src/java/org/libreoffice/ToolbarController.java index a03abc653d39..ec00abb2808c 100644 --- a/android/source/src/java/org/libreoffice/ToolbarController.java +++ b/android/source/src/java/org/libreoffice/ToolbarController.java @@ -129,6 +129,12 @@ public class ToolbarController implements Toolbar.OnMenuItemClickListener { case R.id.action_search: mContext.showSearchToolbar(); return true; + case R.id.action_undo: + LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Undo")); + return true; + case R.id.action_redo: + LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Redo")); + return true; } return false; } |