aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/AboutActivity.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2012-05-06 09:29:22 +0200
committerBananeweizen <bananeweizen@gmx.de>2012-05-06 09:29:22 +0200
commitc5e42735b99baaebbc41e697ff716189821cd02c (patch)
treede2ccf5f2fd941846060a43194d7b2425ea334eb /main/src/cgeo/geocaching/AboutActivity.java
parentf08a9d96915d1f8477b32f9c0b25372a518c5294 (diff)
downloadcgeo-c5e42735b99baaebbc41e697ff716189821cd02c.zip
cgeo-c5e42735b99baaebbc41e697ff716189821cd02c.tar.gz
cgeo-c5e42735b99baaebbc41e697ff716189821cd02c.tar.bz2
refactoring: remove waypoints activity
* replaced by popup meanwhile * rename remaining waypoint activity * rename some of the mostly untouched activities
Diffstat (limited to 'main/src/cgeo/geocaching/AboutActivity.java')
-rw-r--r--main/src/cgeo/geocaching/AboutActivity.java86
1 files changed, 86 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/AboutActivity.java b/main/src/cgeo/geocaching/AboutActivity.java
new file mode 100644
index 0000000..1d7e169
--- /dev/null
+++ b/main/src/cgeo/geocaching/AboutActivity.java
@@ -0,0 +1,86 @@
+package cgeo.geocaching;
+
+import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.utils.Log;
+
+import android.content.Intent;
+import android.content.pm.PackageInfo;
+import android.net.Uri;
+import android.os.Bundle;
+import android.text.method.LinkMovementMethod;
+import android.view.View;
+import android.widget.TextView;
+
+public class AboutActivity extends AbstractActivity {
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setTheme();
+ setContentView(R.layout.about);
+ setTitle(res.getString(R.string.about));
+
+ init();
+ }
+
+ private void init() {
+ try {
+ final PackageInfo info = getPackageManager().getPackageInfo(this.getPackageName(), 0);
+
+ setTitle(res.getString(R.string.about) + " (ver. " + info.versionName + ")");
+ ((TextView) findViewById(R.id.contributors)).setMovementMethod(LinkMovementMethod.getInstance());
+ ((TextView) findViewById(R.id.changelog)).setMovementMethod(LinkMovementMethod.getInstance());
+ } catch (Exception e) {
+ Log.e("AboutActivity.init: Failed to obtain package version.");
+ }
+ }
+
+ /**
+ * @param view
+ * unused here but needed since this method is referenced from XML layout
+ */
+ public void donate(View view) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FMLNN8GXZKJEE")));
+ }
+
+ /**
+ * @param view
+ * unused here but needed since this method is referenced from XML layout
+ */
+ public void support(View view) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("mailto:support@cgeo.org")));
+ }
+
+ /**
+ * @param view
+ * unused here but needed since this method is referenced from XML layout
+ */
+ public void website(View view) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.cgeo.org/")));
+ }
+
+ /**
+ * @param view
+ * unused here but needed since this method is referenced from XML layout
+ */
+ public void facebook(View view) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.facebook.com/pages/cgeo/297269860090")));
+ }
+
+ /**
+ * @param view
+ * unused here but needed since this method is referenced from XML layout
+ */
+ public void twitter(View view) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://twitter.com/android_gc")));
+ }
+
+ /**
+ * @param view
+ * unused here but needed since this method is referenced from XML layout
+ */
+ public void nutshellmanual(View view) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.cgeo.org/")));
+ }
+}