[Libreoffice-commits] core.git: android/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Aug 20 22:10:32 UTC 2018
android/source/res/drawable/ic_format_clear_black_24dp.xml | 9 +++++++++
android/source/res/layout/toolbar_bottom.xml | 10 ++++++++++
android/source/src/java/org/libreoffice/FormattingController.java | 6 +++++-
3 files changed, 24 insertions(+), 1 deletion(-)
New commits:
commit 414ef6cb187dd3bbcc917dbedf3c0c1cc8668f60
Author: Mert Tumer <merttumer at outlook.com>
AuthorDate: Sat Aug 18 07:57:40 2018 -0700
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Aug 21 00:10:10 2018 +0200
Added Clear Formatting button on Android Viewer
Change-Id: If576aaf3e5095e660219fed9f5e11971c9a73469
Signed-off-by: Mert Tumer <merttumer7 at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/59293
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/android/source/res/drawable/ic_format_clear_black_24dp.xml b/android/source/res/drawable/ic_format_clear_black_24dp.xml
new file mode 100644
index 000000000000..4c903c7163e0
--- /dev/null
+++ b/android/source/res/drawable/ic_format_clear_black_24dp.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M3.27,5L2,6.27l6.97,6.97L6.5,19h3l1.57,-3.66L16.73,21 18,19.73 3.55,5.27 3.27,5zM6,5v0.18L8.82,8h2.4l-0.72,1.68 2.1,2.1L14.21,8H20V5H6z"/>
+</vector>
diff --git a/android/source/res/layout/toolbar_bottom.xml b/android/source/res/layout/toolbar_bottom.xml
index ca842842625b..bfe5f74828b3 100644
--- a/android/source/res/layout/toolbar_bottom.xml
+++ b/android/source/res/layout/toolbar_bottom.xml
@@ -107,6 +107,16 @@
android:paddingTop="12dp"
android:src="@drawable/ic_format_strikethrough" />
+ <ImageButton
+ android:id="@+id/button_clearformatting"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="0.25"
+ android:background="@drawable/image_button_background"
+ android:paddingBottom="12dp"
+ android:paddingTop="12dp"
+ app:srcCompat="@drawable/ic_format_clear_black_24dp" />
+
</LinearLayout>
<Spinner
diff --git a/android/source/src/java/org/libreoffice/FormattingController.java b/android/source/src/java/org/libreoffice/FormattingController.java
index 0f49a57de997..7fe538c0e555 100644
--- a/android/source/src/java/org/libreoffice/FormattingController.java
+++ b/android/source/src/java/org/libreoffice/FormattingController.java
@@ -53,6 +53,7 @@ class FormattingController implements View.OnClickListener {
mContext.findViewById(R.id.button_italic).setOnClickListener(this);
mContext.findViewById(R.id.button_strikethrough).setOnClickListener(this);
mContext.findViewById(R.id.button_underlined).setOnClickListener(this);
+ mContext.findViewById(R.id.button_clearformatting).setOnClickListener(this);
mContext.findViewById(R.id.button_align_left).setOnClickListener(this);
mContext.findViewById(R.id.button_align_center).setOnClickListener(this);
@@ -102,8 +103,11 @@ class FormattingController implements View.OnClickListener {
case R.id.button_strikethrough:
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Strikeout"));
break;
+ case R.id.button_clearformatting:
+ LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:ResetAttributes"));
+ break;
case R.id.button_underlined:
- LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Underline"));
+ LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:UnderlineDouble"));
break;
case R.id.button_align_left:
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:LeftPara"));
More information about the Libreoffice-commits
mailing list