android/source/lint-baseline.xml | 98 +++--------------------- android/source/res/layout/activity_main.xml | 2 android/source/res/layout/item_recent_files.xml | 1 android/source/res/layout/number_picker.xml | 4 4 files changed, 16 insertions(+), 89 deletions(-)
New commits: commit 034543c7c8c701cec646dbafcc356b66c95e2acd Author: Michael Weghorn <[email protected]> AuthorDate: Wed Jul 9 14:55:48 2025 +0200 Commit: Skyler Grey <[email protected]> CommitDate: Wed Oct 8 11:53:04 2025 +0200 android lint: Drop redundant android:layout_margin{Left,Right} attrs Address those lint warnings which would otherwise trigger build errors in a WIP branch updating compileSdkVersion and targetSdkVersion to 36. Regenerate android/source/lint-baseline.xml Change-Id: I2f75a04898d38bf6661ba50bcdbe13677065f695 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187575 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192035 Reviewed-by: Skyler Grey <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/android/source/lint-baseline.xml b/android/source/lint-baseline.xml index 12594c48345e..965e1ac48903 100644 --- a/android/source/lint-baseline.xml +++ b/android/source/lint-baseline.xml @@ -1920,7 +1920,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="30" + line="28" column="9"/> </issue> @@ -1931,7 +1931,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="64" + line="62" column="9"/> </issue> @@ -1942,7 +1942,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="95" + line="92" column="9"/> </issue> @@ -1953,7 +1953,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="126" + line="122" column="9"/> </issue> @@ -1997,7 +1997,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="16" + line="15" column="9"/> </issue> @@ -2008,7 +2008,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="32" + line="30" column="9"/> </issue> @@ -2019,7 +2019,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="45" + line="43" column="9"/> </issue> @@ -2030,7 +2030,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="60" + line="58" column="9"/> </issue> @@ -2041,7 +2041,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="77" + line="74" column="9"/> </issue> @@ -2052,7 +2052,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="90" + line="87" column="9"/> </issue> @@ -2063,7 +2063,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="108" + line="105" column="9"/> </issue> @@ -2074,7 +2074,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~"> <location file="res/layout/number_picker.xml" - line="122" + line="118" column="9"/> </issue> @@ -2144,61 +2144,6 @@ column="21"/> </issue> - <issue - id="RtlHardcoded" - message="Redundant attribute `layout_marginRight`; already defining `layout_marginEnd` with `targetSdkVersion` 34" - errorLine1=" android:layout_marginRight="@dimen/file_icon_margin_end"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="res/layout/item_recent_files.xml" - line="26" - column="9"/> - </issue> - - <issue - id="RtlHardcoded" - message="Redundant attribute `layout_marginLeft`; already defining `layout_marginStart` with `targetSdkVersion` 34" - errorLine1=" android:layout_marginLeft="8dp"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="res/layout/number_picker.xml" - line="14" - column="9"/> - </issue> - - <issue - id="RtlHardcoded" - message="Redundant attribute `layout_marginRight`; already defining `layout_marginEnd` with `targetSdkVersion` 34" - errorLine1=" android:layout_marginRight="8dp"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="res/layout/number_picker.xml" - line="27" - column="9"/> - </issue> - - <issue - id="RtlHardcoded" - message="Redundant attribute `layout_marginLeft`; already defining `layout_marginStart` with `targetSdkVersion` 34" - errorLine1=" android:layout_marginLeft="8dp"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="res/layout/number_picker.xml" - line="75" - column="9"/> - </issue> - - <issue - id="RtlHardcoded" - message="Redundant attribute `layout_marginRight`; already defining `layout_marginEnd` with `targetSdkVersion` 34" - errorLine1=" android:layout_marginRight="8dp"" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="res/layout/number_picker.xml" - line="120" - column="9"/> - </issue> - <issue id="RtlHardcoded" message="Redundant attribute `layout_alignParentRight`; already defining `layout_alignParentEnd` with `targetSdkVersion` 34" diff --git a/android/source/res/layout/item_recent_files.xml b/android/source/res/layout/item_recent_files.xml index f13839b44b73..9b5a45d8e222 100644 --- a/android/source/res/layout/item_recent_files.xml +++ b/android/source/res/layout/item_recent_files.xml @@ -23,7 +23,6 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginEnd="@dimen/file_icon_margin_end" - android:layout_marginRight="@dimen/file_icon_margin_end" android:adjustViewBounds="true" android:id="@+id/imageView" android:contentDescription="@string/file_icon_desc"/> diff --git a/android/source/res/layout/number_picker.xml b/android/source/res/layout/number_picker.xml index 32eea0e80a84..cb2064e5e611 100644 --- a/android/source/res/layout/number_picker.xml +++ b/android/source/res/layout/number_picker.xml @@ -11,7 +11,6 @@ android:layout_width="wrap_content" android:layout_height="30dp" android:layout_marginStart="8dp" - android:layout_marginLeft="8dp" android:layout_marginTop="8dp" android:text="Rows:" android:gravity="center" @@ -24,7 +23,6 @@ android:layout_width="30dp" android:layout_height="30dp" android:layout_marginEnd="8dp" - android:layout_marginRight="8dp" android:layout_marginTop="8dp" android:background="@drawable/image_button_background" android:clickable="true" @@ -72,7 +70,6 @@ android:layout_width="wrap_content" android:layout_height="30dp" android:layout_marginStart="8dp" - android:layout_marginLeft="8dp" android:layout_marginTop="24dp" android:text="Columns:" android:gravity="center" @@ -117,7 +114,6 @@ android:layout_width="30dp" android:layout_height="30dp" android:layout_marginEnd="8dp" - android:layout_marginRight="8dp" android:layout_marginTop="24dp" android:text="+" android:gravity="center" commit bfd5f36170e85231295eccb54246249ae79adb37 Author: Michael Weghorn <[email protected]> AuthorDate: Wed Jul 9 14:42:02 2025 +0200 Commit: Skyler Grey <[email protected]> CommitDate: Wed Oct 8 11:52:51 2025 +0200 android lint: Always have Calc doc right of headers Address these 2 lint warnings which would otherwise trigger build errors in a WIP branch updating compileSdkVersion and targetSdkVersion to 36. <issue id="RtlHardcoded" message="Redundant attribute `layout_toRightOf`; already defining `layout_toEndOf` with `targetSdkVersion` 34" errorLine1=" android:layout_toRightOf="@+id/calc_header_top_left"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="res/layout/activity_main.xml" line="78" column="21"/> </issue> <issue id="RtlHardcoded" message="Redundant attribute `layout_toRightOf`; already defining `layout_toEndOf` with `targetSdkVersion` 34" errorLine1=" android:layout_toRightOf="@+id/calc_header_row"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="res/layout/activity_main.xml" line="94" column="21"/> </issue> Like the desktop version of LibreOffice, have the Calc doc always to the right of the headers, regardless of whether RTL or LTR is used, i.e. leave `android:layout_toRightOf` and drop the `layout_toEndOf` attribute. this triggers other lint warnings. Regenerate android/source/lint-baseline.xml to not fail the build on those. Change-Id: I4b3c1076d62a757164a3ae1953fe0c73ddc444c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187574 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192034 Reviewed-by: Skyler Grey <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/android/source/lint-baseline.xml b/android/source/lint-baseline.xml index 5888d2327d22..12594c48345e 100644 --- a/android/source/lint-baseline.xml +++ b/android/source/lint-baseline.xml @@ -111,17 +111,6 @@ column="79"/> </issue> - <issue - id="GradleDependency" - message="A newer version of androidx.constraintlayout:constraintlayout than 2.2.0 is available: 2.2.1" - errorLine1=" implementation 'androidx.constraintlayout:constraintlayout:2.2.0'" - errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location - file="build.gradle" - line="36" - column="20"/> - </issue> - <issue id="GradleDependency" message="A newer version of `compileSdkVersion` than 34 is available: 36" @@ -1381,7 +1370,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/java/org/libreoffice/ui/LibreOfficeUIActivity.java" - line="408" + line="415" column="13"/> </issue> @@ -2135,7 +2124,7 @@ <issue id="RtlHardcoded" - message="Redundant attribute `layout_toRightOf`; already defining `layout_toEndOf` with `targetSdkVersion` 34" + message="Consider replacing `android:layout_toRightOf` with `android:layout_toEndOf="@+id/calc_header_top_left"` to better support right-to-left layouts" errorLine1=" android:layout_toRightOf="@+id/calc_header_top_left"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> <location @@ -2146,12 +2135,12 @@ <issue id="RtlHardcoded" - message="Redundant attribute `layout_toRightOf`; already defining `layout_toEndOf` with `targetSdkVersion` 34" + message="Consider replacing `android:layout_toRightOf` with `android:layout_toEndOf="@+id/calc_header_row"` to better support right-to-left layouts" errorLine1=" android:layout_toRightOf="@+id/calc_header_row"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> <location file="res/layout/activity_main.xml" - line="94" + line="93" column="21"/> </issue> diff --git a/android/source/res/layout/activity_main.xml b/android/source/res/layout/activity_main.xml index e503cb90f0eb..f2caccdf12c3 100644 --- a/android/source/res/layout/activity_main.xml +++ b/android/source/res/layout/activity_main.xml @@ -76,7 +76,6 @@ android:layout_width="match_parent" android:layout_height="@dimen/calc_header_height" android:layout_toRightOf="@+id/calc_header_top_left" - android:layout_toEndOf="@+id/calc_header_top_left" android:visibility="gone"/> <org.libreoffice.overlay.CalcHeadersView @@ -92,7 +91,6 @@ android:layout_height="match_parent" android:orientation="vertical" android:layout_toRightOf="@+id/calc_header_row" - android:layout_toEndOf="@+id/calc_header_row" android:layout_below="@+id/calc_header_column"> <org.mozilla.gecko.gfx.LayerView
