android/source/res/layout/toolbar_bottom.xml                  |    4 ++--
 android/source/src/java/org/libreoffice/SearchController.java |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 01f58847bb1addb59e963fe820e01b8a191bacba
Author:     Michael Weghorn <[email protected]>
AuthorDate: Fri Mar 6 09:21:36 2020 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Mar 6 16:46:02 2020 +0100

    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 <[email protected]>

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
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to