diff options
author | Mert Tumer <merttumer@outlook.com> | 2018-08-18 07:57:40 -0700 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-08-21 00:10:10 +0200 |
commit | 414ef6cb187dd3bbcc917dbedf3c0c1cc8668f60 (patch) | |
tree | e40c2edcd96c49c2709a2a4ff6e61edc38e87a48 /android | |
parent | 1c08deed080e46478d6aac198e0b2f8f1ff54fe5 (diff) |
Added Clear Formatting button on Android Viewer
Change-Id: If576aaf3e5095e660219fed9f5e11971c9a73469
Signed-off-by: Mert Tumer <merttumer7@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/59293
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'android')
3 files changed, 24 insertions, 1 deletions
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")); |