android: add toolbar button to force-show the soft keyboard

Change-Id: I1758f4db7b6894df66d721af77092754b0252100
This commit is contained in:
Miklos Vajna
2015-03-13 18:21:30 +01:00
parent af379e99eb
commit 2479fae410
4 changed files with 10 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -10,6 +10,12 @@
android:orderInCategory="100" android:orderInCategory="100"
app:showAsAction="always"/> app:showAsAction="always"/>
<item android:id="@+id/action_keyboard"
android:title="@string/action_keyboard"
android:icon="@drawable/ic_format_keyboard_grey600_24dp"
android:orderInCategory="100"
app:showAsAction="always"/>
<item android:id="@+id/action_about" <item android:id="@+id/action_about"
android:title="@string/action_about" android:title="@string/action_about"
android:orderInCategory="100" /> android:orderInCategory="100" />

View File

@@ -35,5 +35,6 @@
<string name="local_documents">Local documents</string> <string name="local_documents">Local documents</string>
<string name="local_file_system">Local file system</string> <string name="local_file_system">Local file system</string>
<string name="action_bold">Bold</string> <string name="action_bold">Bold</string>
<string name="action_keyboard">Show keyboard</string>
</resources> </resources>

View File

@@ -79,6 +79,9 @@ public class LibreOfficeMainActivity extends ActionBarActivity {
case R.id.action_bold: case R.id.action_bold:
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Bold")); LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Bold"));
return true; return true;
case R.id.action_keyboard:
showSoftKeyboard();
break;
case R.id.action_about: case R.id.action_about:
mAbout.showAbout(); mAbout.showAbout();
return true; return true;