[Libreoffice-commits] core.git: android/source
Christian Lohmaier
lohmaier+LibreOffice at googlemail.com
Thu Sep 7 20:04:34 UTC 2017
android/source/res/values/strings.xml | 2 +-
android/source/src/java/org/libreoffice/AboutDialogFragment.java | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 7b946b386d18172cad2bea4c05c825eb8021131d
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date: Tue Sep 5 22:28:03 2017 +0200
tdf#90556 android: make buildID in about a clickable link to git log
that will allow them to deduce the age of the build
Change-Id: Ic1baffbf1ecc6a743a1edd91d24c86670dc640a3
Reviewed-on: https://gerrit.libreoffice.org/41962
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml
index c8c84f9702ba..e84c496db3c5 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -5,7 +5,7 @@
<string name="app_name_settings">LibreOffice Viewer Settings</string>
<string name="app_about_name"><b>LibreOffice Viewer \'Beta\'</b></string>
- <string name="app_version">Version: $VERSION\nBuild ID: $BUILDID</string>
+ <string name="app_version">Version: %1$s\nBuild ID: %2$s</string>
<string name="app_description">LibreOffice Viewer is a document viewer based on LibreOffice.</string>
<string name="app_credits">http://www.libreoffice.org</string>
<string name="app_vendor">This release was supplied by $VENDOR.</string>
diff --git a/android/source/src/java/org/libreoffice/AboutDialogFragment.java b/android/source/src/java/org/libreoffice/AboutDialogFragment.java
index 1f4e7438d2ce..c5875ecf0ee3 100644
--- a/android/source/src/java/org/libreoffice/AboutDialogFragment.java
+++ b/android/source/src/java/org/libreoffice/AboutDialogFragment.java
@@ -20,6 +20,8 @@ import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
+import android.text.Html;
+import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.TextView;
@@ -52,12 +54,12 @@ public class AboutDialogFragment extends DialogFragment {
String[] tokens = versionName.split("/");
if (tokens.length == 3)
{
- String version = versionView.getText().toString();
+ String version = String.format(versionView.getText().toString().replace("\n", "<br/>"),
+ tokens[0], "<a href=\"https://hub.libreoffice.org/git-core/" + tokens[1] + "\">" + tokens[1] + "</a>");
+ versionView.setText(Html.fromHtml(version));
+ versionView.setMovementMethod(LinkMovementMethod.getInstance());
String vendor = vendorView.getText().toString();
- version = version.replace("$VERSION", tokens[0]);
- version = version.replace("$BUILDID", tokens[1]);
vendor = vendor.replace("$VENDOR", tokens[2]);
- versionView.setText(version);
vendorView.setText(vendor);
}
else
More information about the Libreoffice-commits
mailing list