summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2020-03-06 09:21:36 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2020-03-06 16:46:02 +0100
commit01f58847bb1addb59e963fe820e01b8a191bacba (patch)
tree80e11e6063fd48ead426d9fd5a375c9ce2c568de /android
parent8666ac00f89e31db8a09b3bdb004a0e275744113 (diff)
android: Fix inverted naming for up/down in search
The naming for the directions UP and DOWN were used the wrong way around, which was also apparent when looking at 'android/source/res/layout/toolbar_bottom.xml', where icon '"@drawable/ic_search_direction_down"' was assigned to the button with ID "@+id/button_search_up" (and vice versa). Adapt the naming to avoid confusion. Change-Id: I5cf59f1789f2c12651ce6a5638d559658d9d4deb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90091 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'android')
-rw-r--r--android/source/res/layout/toolbar_bottom.xml4
-rw-r--r--android/source/src/java/org/libreoffice/SearchController.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/android/source/res/layout/toolbar_bottom.xml b/android/source/res/layout/toolbar_bottom.xml
index 6fc85ea96290..7688dd4f01fc 100644
--- a/android/source/res/layout/toolbar_bottom.xml
+++ b/android/source/res/layout/toolbar_bottom.xml
@@ -438,7 +438,7 @@
android:inputType="" />
<ImageButton
- android:id="@+id/button_search_up"
+ android:id="@+id/button_search_down"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.6"
@@ -447,7 +447,7 @@
android:src="@drawable/ic_search_direction_down" />
<ImageButton
- android:id="@+id/button_search_down"
+ android:id="@+id/button_search_up"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.6"
diff --git a/android/source/src/java/org/libreoffice/SearchController.java b/android/source/src/java/org/libreoffice/SearchController.java
index 09652e9958be..61f5373c82f0 100644
--- a/android/source/src/java/org/libreoffice/SearchController.java
+++ b/android/source/src/java/org/libreoffice/SearchController.java
@@ -26,7 +26,7 @@ public class SearchController implements View.OnClickListener {
JSONObject rootJson = new JSONObject();
addProperty(rootJson, "SearchItem.SearchString", "string", searchString);
- addProperty(rootJson, "SearchItem.Backward", "boolean", direction == SearchDirection.DOWN ? "true" : "false");
+ addProperty(rootJson, "SearchItem.Backward", "boolean", direction == SearchDirection.UP ? "true" : "false");
addProperty(rootJson, "SearchItem.SearchStartPointX", "long", String.valueOf((long) UnitConverter.pixelToTwip(x, LOKitShell.getDpi(mActivity))));
addProperty(rootJson, "SearchItem.SearchStartPointY", "long", String.valueOf((long) UnitConverter.pixelToTwip(y, LOKitShell.getDpi(mActivity))));
addProperty(rootJson, "SearchItem.Command", "long", String.valueOf(0)); // search all == 1