diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2017-09-05 22:28:03 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2017-09-07 22:04:14 +0200 |
commit | 7b946b386d18172cad2bea4c05c825eb8021131d (patch) | |
tree | 7e2ce12073e5dfe43c600cbb51d35791e0fba4be | |
parent | 2e8e0b213a3cbac802515cd9255286b26d3bba60 (diff) |
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@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r-- | android/source/res/values/strings.xml | 2 | ||||
-rw-r--r-- | android/source/src/java/org/libreoffice/AboutDialogFragment.java | 10 |
2 files changed, 7 insertions, 5 deletions
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 |