diff options
author | lado <herrlado@gmail.com> | 2011-10-31 23:20:54 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2011-10-31 23:20:54 +0100 |
commit | f21a50e947a6857c1e680e41c2a5acc38479441a (patch) | |
tree | b80a2ed218938968066356c49d9767a1bd96c163 /vdrmanager/src/de/bjusystems | |
parent | 5eb3a01d2213e03949478bb8b62da11001e08a3e (diff) | |
download | vdr-manager-f21a50e947a6857c1e680e41c2a5acc38479441a.tar.gz vdr-manager-f21a50e947a6857c1e680e41c2a5acc38479441a.tar.bz2 |
about tool
Diffstat (limited to 'vdrmanager/src/de/bjusystems')
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/gui/About.java | 33 |
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(); + } +} |