summaryrefslogtreecommitdiff
path: root/src/se/leap/bitmaskclient/AboutActivity.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-12-12 18:11:19 +0100
committerParménides GV <parmegv@sdf.org>2013-12-12 18:11:19 +0100
commitaf5268b24a546f9a7a2693ec3ae339dd6ca7ea4f (patch)
tree0ec6bb8bef6fc8c9401be3e8de68e21b08b84a26 /src/se/leap/bitmaskclient/AboutActivity.java
parent623cd76d9e1b26d81406fb886dea18a93dee8431 (diff)
About is now an Activity.
I've also removed some spaces from the text.
Diffstat (limited to 'src/se/leap/bitmaskclient/AboutActivity.java')
-rw-r--r--src/se/leap/bitmaskclient/AboutActivity.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/se/leap/bitmaskclient/AboutActivity.java b/src/se/leap/bitmaskclient/AboutActivity.java
new file mode 100644
index 00000000..a3320c81
--- /dev/null
+++ b/src/se/leap/bitmaskclient/AboutActivity.java
@@ -0,0 +1,48 @@
+package se.leap.bitmaskclient;
+
+import android.app.Activity;
+import android.app.Fragment;
+import android.content.pm.PackageInfo;
+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;
+import se.leap.bitmaskclient.R;
+
+public class AboutActivity extends Activity {
+
+ final public static String TAG = "aboutFragment";
+ final public static int VIEWED = 0;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.about);
+ TextView ver = (TextView) findViewById(R.id.version);
+
+ String version;
+ String name="Openvpn";
+ try {
+ PackageInfo packageinfo = getPackageManager().getPackageInfo(getPackageName(), 0);
+ version = packageinfo.versionName;
+ name = getString(R.string.app);
+ } catch (NameNotFoundException e) {
+ version = "error fetching version";
+ }
+
+
+ ver.setText(getString(R.string.version_info,name,version));
+
+ TextView translation = (TextView) findViewById(R.id.translation);
+
+ // Don't print a text for myself
+ if ( getString(R.string.translationby).contains("Arne Schwabe"))
+ translation.setVisibility(TextView.INVISIBLE);
+ else
+ translation.setText(R.string.translationby);
+ setResult(VIEWED);
+ }
+
+}