Kaydet (Commit) 89089204 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

android: add undo/redo to the main toolbar

Change-Id: I64f76d22018fcd8af2991933ba5ab2069f84181f
üst 6636476c
<?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
<?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
......@@ -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"
......
......@@ -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>
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment