summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/AboutFragment.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-05-05 17:55:46 +0200
committerArne Schwabe <arne@rfc2549.org>2012-05-05 17:55:46 +0200
commit4a7488e0b5dc2a0069d2a4c9b461631016a95d45 (patch)
tree4b3ea85dc5d6ef8c2f583238533b4ce20def5936 /src/de/blinkt/openvpn/AboutFragment.java
parent93a5fd15a90fe88308003547d55e32123b6999e4 (diff)
First time a fd was successfully transfered over a socket :)
Diffstat (limited to 'src/de/blinkt/openvpn/AboutFragment.java')
-rw-r--r--src/de/blinkt/openvpn/AboutFragment.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/de/blinkt/openvpn/AboutFragment.java b/src/de/blinkt/openvpn/AboutFragment.java
index c96c5833..065e53bc 100644
--- a/src/de/blinkt/openvpn/AboutFragment.java
+++ b/src/de/blinkt/openvpn/AboutFragment.java
@@ -1,10 +1,12 @@
package de.blinkt.openvpn;
import android.app.Fragment;
+import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.TextView;
public class AboutFragment extends Fragment {
@@ -18,6 +20,17 @@ public class AboutFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v= inflater.inflate(R.layout.about, container, false);
+ TextView ver = (TextView) v.findViewById(R.id.version);
+
+ String version;
+ try {
+ version = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0).versionName;
+ } catch (NameNotFoundException e) {
+ version = "error fetching version";
+ }
+
+
+ ver.setText(getString(R.string.version_info,version));
return v;
}