summaryrefslogtreecommitdiffstats
path: root/android/source/src/java/org/libreoffice/AboutDialogFragment.java
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-11-30 12:54:54 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-11-30 14:40:08 +0100
commit3ee963afc7dfae473d5368e88a2caa847f7450f8 (patch)
tree8156ecff1df09cea4310a817afc046c555460415 /android/source/src/java/org/libreoffice/AboutDialogFragment.java
parentandroid: Simplify version info handling for about dialog (diff)
downloadcore-3ee963afc7dfae473d5368e88a2caa847f7450f8.tar.gz
core-3ee963afc7dfae473d5368e88a2caa847f7450f8.zip
android: Simplify vendor info handling for about dialog
Similar to Change-Id: Iaa78f5a6020bea4ed80a1b41d3b23cc8d313813c Author: Michael Weghorn <m.weghorn@posteo.de> 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 <m.weghorn@posteo.de>
Diffstat (limited to 'android/source/src/java/org/libreoffice/AboutDialogFragment.java')
-rw-r--r--android/source/src/java/org/libreoffice/AboutDialogFragment.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/android/source/src/java/org/libreoffice/AboutDialogFragment.java b/android/source/src/java/org/libreoffice/AboutDialogFragment.java
index de2e48ffbdde..b215ab5e7601 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());