summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/source/res/values/strings.xml2
-rw-r--r--android/source/src/java/org/libreoffice/AboutDialogFragment.java10
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