android/source/res/layout/about.xml | 1 - android/source/src/java/org/libreoffice/AboutDialogFragment.java | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-)
New commits: commit 9593fed1207c1ab0157a9dd9d027ad2de07d9ea0 Author: Michael Weghorn <[email protected]> AuthorDate: Thu Nov 30 12:54:54 2023 +0100 Commit: Christian Lohmaier <[email protected]> CommitDate: Thu Dec 14 12:57:59 2023 +0100 android: Simplify vendor info handling for about dialog Similar to Change-Id: Iaa78f5a6020bea4ed80a1b41d3b23cc8d313813c Author: Michael Weghorn <[email protected]> Date: Thu Nov 30 12:00:52 2023 +0100 android: Simplify version info handling for about dialog , also simplify the handling of the vendor info text by retrieving the text from the string resource right away. Change-Id: I7d56b1814454be2bc8d13e01265f0a0db6d865be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160147 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> (cherry picked from commit 3ee963afc7dfae473d5368e88a2caa847f7450f8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160047 Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/android/source/res/layout/about.xml b/android/source/res/layout/about.xml index 8cce41cf076d..30f1ed3d95ae 100644 --- a/android/source/res/layout/about.xml +++ b/android/source/res/layout/about.xml @@ -38,7 +38,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:textIsSelectable="true" - android:text="@string/app_vendor" android:textSize="18sp"/> </LinearLayout> </ScrollView> diff --git a/android/source/src/java/org/libreoffice/AboutDialogFragment.java b/android/source/src/java/org/libreoffice/AboutDialogFragment.java index 3fe5ca097525..17c636629f61 100644 --- a/android/source/src/java/org/libreoffice/AboutDialogFragment.java +++ b/android/source/src/java/org/libreoffice/AboutDialogFragment.java @@ -40,8 +40,7 @@ public class AboutDialogFragment extends DialogFragment { int defaultColor = textView.getTextColors().getDefaultColor(); textView.setTextColor(defaultColor); - // Take care of placeholders in the version and vendor text views. - TextView vendorView = messageView.findViewById(R.id.about_vendor); + // Take care of placeholders and set text in version and vendor text views. try { String versionName = getActivity().getPackageManager() @@ -55,8 +54,8 @@ public class AboutDialogFragment extends DialogFragment { TextView versionView = messageView.findViewById(R.id.about_version); versionView.setText(versionString); versionView.setMovementMethod(LinkMovementMethod.getInstance()); - String vendor = vendorView.getText().toString(); - vendor = vendor.replace("$VENDOR", tokens[2]); + TextView vendorView = messageView.findViewById(R.id.about_vendor); + String vendor = getString(R.string.app_vendor).replace("$VENDOR", tokens[2]); vendorView.setText(vendor); } else @@ -64,7 +63,6 @@ public class AboutDialogFragment extends DialogFragment { } catch (PackageManager.NameNotFoundException e) { - vendorView.setText(""); } AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
