summaryrefslogtreecommitdiff
path: root/vdrmanager
diff options
context:
space:
mode:
Diffstat (limited to 'vdrmanager')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/About.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/About.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/About.java
new file mode 100644
index 0000000..eb6252c
--- /dev/null
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/About.java
@@ -0,0 +1,33 @@
+package de.bjusystems.vdrmanager.gui;
+
+import de.bjusystems.vdrmanager.R;
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.pm.PackageInfo;
+import android.text.SpannableString;
+import android.text.util.Linkify;
+
+public class About {
+
+ static AlertDialog about = null;
+
+ public static void show(Activity activity){
+ if(about == null){
+ String vi = "";
+ PackageInfo pi = Utils.getPackageInfo(activity);
+ if(pi != null){
+ vi = "v"+pi.versionName;
+ }
+ //View view = activity.getLayoutInflater().inflate(R.layout.about, null);
+ final SpannableString s = new SpannableString(activity.getString(R.string.about_text,vi));
+ Linkify.addLinks(s, Linkify.ALL);
+ about = new AlertDialog.Builder(activity)
+ .setTitle(R.string.about_title)
+ .setMessage(s)
+ .setPositiveButton(android.R.string.ok, null)
+ .setCancelable(false)
+ .create();
+ }
+ about.show();
+ }
+}