aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/AndroidManifest.xml2
-rw-r--r--main/res/layout/about_activity.xml311
-rw-r--r--main/res/layout/about_changes_page.xml40
-rw-r--r--main/res/layout/about_contributors_page.xml27
-rw-r--r--main/res/layout/about_help_page.xml126
-rw-r--r--main/res/layout/about_license_page.xml43
-rw-r--r--main/res/layout/about_version_page.xml99
-rw-r--r--main/res/layout/viewpager_activity.xml (renamed from main/res/layout/trackable_activity.xml)0
-rw-r--r--main/res/raw/license.txt202
-rw-r--r--main/res/values/strings.xml2
-rw-r--r--main/res/values/strings_not_translatable.xml2
-rw-r--r--main/src/cgeo/geocaching/AboutActivity.java216
-rw-r--r--main/src/cgeo/geocaching/MainActivity.java2
-rw-r--r--main/src/cgeo/geocaching/TrackableActivity.java2
14 files changed, 708 insertions, 366 deletions
diff --git a/main/AndroidManifest.xml b/main/AndroidManifest.xml
index 9b53da8..ef0b781 100644
--- a/main/AndroidManifest.xml
+++ b/main/AndroidManifest.xml
@@ -96,7 +96,7 @@
android:windowSoftInputMode="stateHidden" >
</activity>
<activity
- android:name=".AboutActivity_"
+ android:name=".AboutActivity"
android:configChanges="keyboardHidden|orientation"
android:label="@string/about"
android:windowSoftInputMode="stateHidden" >
diff --git a/main/res/layout/about_activity.xml b/main/res/layout/about_activity.xml
deleted file mode 100644
index 4afb8a6..0000000
--- a/main/res/layout/about_activity.xml
+++ /dev/null
@@ -1,311 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:background="?background_color"
- android:orientation="vertical" >
-
- <include layout="@layout/actionbar" />
-
- <ScrollView
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:padding="4dip" >
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_marginTop="10dip"
- android:orientation="vertical" >
-
- <ImageView
- android:layout_width="200dip"
- android:layout_height="200dip"
- android:layout_gravity="center"
- android:layout_margin="10dip"
- android:gravity="center"
- android:scaleType="fitXY"
- android:src="@drawable/cgeo_logo" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:layout_marginTop="5dip"
- android:text="@string/quote"
- android:textColor="?text_color"
- android:textSize="14sp" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:text="@string/powered_by"
- android:textColor="?text_color"
- android:textSize="14sp" />
- </LinearLayout>
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/about_version" />
- </RelativeLayout>
-
- <TextView
- android:id="@+id/about_version_string"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:textColor="?text_color"
- android:textIsSelectable="true"
- android:textSize="14sp"
- android:textStyle="bold" />
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/about_donate" />
- </RelativeLayout>
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dip"
- android:gravity="center_horizontal"
- android:orientation="horizontal" >
-
- <Button
- style="@style/button_full"
- android:id="@+id/donate"
- android:layout_width="280dip"
- android:lines="2"
- android:singleLine="false"
- android:text="@string/about_donation_more" />
- </LinearLayout>
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/about_detail" />
- </RelativeLayout>
-
- <TextView
- android:id="@+id/faq"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:clickable="true"
- android:focusable="true"
- android:linksClickable="false"
- android:text="@string/faq"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <TextView
- android:id="@+id/support"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:clickable="true"
- android:focusable="true"
- android:linksClickable="false"
- android:text="@string/support"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <TextView
- android:id="@+id/website"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:clickable="true"
- android:focusable="true"
- android:linksClickable="false"
- android:text="@string/website"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <TextView
- android:id="@+id/facebook"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:clickable="true"
- android:focusable="true"
- android:linksClickable="false"
- android:text="@string/facebook"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <TextView
- android:id="@+id/twitter"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:clickable="true"
- android:focusable="true"
- android:linksClickable="false"
- android:text="@string/twitter"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <TextView
- android:id="@+id/nutshellmanual"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:clickable="true"
- android:focusable="true"
- android:linksClickable="false"
- android:text="@string/nutshellmanual"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <TextView
- android:id="@+id/market"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:clickable="true"
- android:focusable="true"
- android:linksClickable="false"
- android:text="@string/market"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/about_changelog" />
- </RelativeLayout>
-
- <TextView
- android:id="@+id/changelog_master"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_margin="7dip"
- android:linksClickable="true"
- android:paddingLeft="3dip"
- android:text="@string/changelog_master"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="12sp" />
-
- <TextView
- android:id="@+id/changelog_release"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_margin="7dip"
- android:linksClickable="true"
- android:paddingLeft="3dip"
- android:text="@string/changelog_release"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="12sp" />
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/about_contributors" />
- </RelativeLayout>
-
- <TextView
- android:id="@+id/contributors"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_margin="7dip"
- android:linksClickable="true"
- android:paddingLeft="3dip"
- android:text="@string/contributors"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/about_license" />
- </RelativeLayout>
-
- <TextView
- android:id="@+id/license"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:clickable="true"
- android:focusable="true"
- android:linksClickable="false"
- android:text="@string/about_apache_license"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
- </LinearLayout>
- </ScrollView>
-
-</LinearLayout>
diff --git a/main/res/layout/about_changes_page.xml b/main/res/layout/about_changes_page.xml
new file mode 100644
index 0000000..544d338
--- /dev/null
+++ b/main/res/layout/about_changes_page.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:padding="4dip" >
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/changelog_master"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_margin="7dip"
+ android:linksClickable="true"
+ android:paddingLeft="3dip"
+ android:text="@string/changelog_master"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="12sp" />
+
+ <TextView
+ android:id="@+id/changelog_release"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_margin="7dip"
+ android:linksClickable="true"
+ android:paddingLeft="3dip"
+ android:text="@string/changelog_release"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="12sp" />
+ </LinearLayout>
+
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/about_contributors_page.xml b/main/res/layout/about_contributors_page.xml
new file mode 100644
index 0000000..9a0955e
--- /dev/null
+++ b/main/res/layout/about_contributors_page.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:padding="4dip" >
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/contributors"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_margin="7dip"
+ android:linksClickable="true"
+ android:paddingLeft="3dip"
+ android:text="@string/contributors"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="14sp" />
+ </LinearLayout>
+
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/about_help_page.xml b/main/res/layout/about_help_page.xml
new file mode 100644
index 0000000..8444094
--- /dev/null
+++ b/main/res/layout/about_help_page.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:padding="4dip" >
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/faq"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:clickable="true"
+ android:focusable="true"
+ android:linksClickable="false"
+ android:text="@string/faq"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="14sp" />
+
+ <TextView
+ android:id="@+id/nutshellmanual"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:clickable="true"
+ android:focusable="true"
+ android:linksClickable="false"
+ android:text="@string/nutshellmanual"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="14sp" />
+
+ <TextView
+ android:id="@+id/website"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:clickable="true"
+ android:focusable="true"
+ android:linksClickable="false"
+ android:text="@string/website"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="14sp" />
+
+ <TextView
+ android:id="@+id/facebook"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:clickable="true"
+ android:focusable="true"
+ android:linksClickable="false"
+ android:text="@string/facebook"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="14sp" />
+
+ <TextView
+ android:id="@+id/twitter"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:clickable="true"
+ android:focusable="true"
+ android:linksClickable="false"
+ android:text="@string/twitter"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="14sp" />
+
+ <TextView
+ android:id="@+id/support"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:clickable="true"
+ android:focusable="true"
+ android:linksClickable="false"
+ android:text="@string/support"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="14sp" />
+
+ <TextView
+ android:id="@+id/market"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:clickable="true"
+ android:focusable="true"
+ android:linksClickable="false"
+ android:text="@string/market"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="14sp" />
+ </LinearLayout>
+
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/about_license_page.xml b/main/res/layout/about_license_page.xml
new file mode 100644
index 0000000..b33f0f9
--- /dev/null
+++ b/main/res/layout/about_license_page.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:padding="4dip" >
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/license"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:clickable="true"
+ android:focusable="true"
+ android:linksClickable="false"
+ android:text="@string/about_apache_license"
+ android:textColor="?text_color"
+ android:textColorLink="?text_color_link"
+ android:textSize="14sp" />
+
+ <TextView
+ android:id="@+id/license_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_margin="7dip"
+ android:paddingLeft="3dip"
+ android:text="@null"
+ android:textColor="?text_color"
+ android:textSize="10sp"
+ tools:ignore="SmallSp" />
+ </LinearLayout>
+
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/about_version_page.xml b/main/res/layout/about_version_page.xml
new file mode 100644
index 0000000..80630e4
--- /dev/null
+++ b/main/res/layout/about_version_page.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:padding="4dip" >
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_marginTop="10dip"
+ android:orientation="vertical" >
+
+ <ImageView
+ android:layout_width="200dip"
+ android:layout_height="200dip"
+ android:layout_gravity="center"
+ android:layout_margin="10dip"
+ android:gravity="center"
+ android:scaleType="fitXY"
+ android:src="@drawable/cgeo_logo" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:layout_marginTop="5dip"
+ android:text="@string/quote"
+ android:textColor="?text_color"
+ android:textSize="14sp" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:text="@string/powered_by"
+ android:textColor="?text_color"
+ android:textSize="14sp" />
+ </LinearLayout>
+
+ <RelativeLayout style="@style/separator_horizontal_layout" >
+
+ <View style="@style/separator_horizontal" />
+
+ <TextView
+ style="@style/separator_horizontal_headline"
+ android:text="@string/about_version" />
+ </RelativeLayout>
+
+ <TextView
+ android:id="@+id/about_version_string"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:textColor="?text_color"
+ android:textIsSelectable="true"
+ android:textSize="14sp"
+ android:textStyle="bold" />
+
+ <RelativeLayout style="@style/separator_horizontal_layout" >
+
+ <View style="@style/separator_horizontal" />
+
+ <TextView
+ style="@style/separator_horizontal_headline"
+ android:text="@string/about_donate" />
+ </RelativeLayout>
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dip"
+ android:gravity="center_horizontal"
+ android:orientation="horizontal" >
+
+ <Button
+ android:id="@+id/donate"
+ style="@style/button_full"
+ android:layout_width="280dip"
+ android:lines="2"
+ android:singleLine="false"
+ android:text="@string/about_donation_more" />
+ </LinearLayout>
+ </LinearLayout>
+
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/trackable_activity.xml b/main/res/layout/viewpager_activity.xml
index 14120e0..14120e0 100644
--- a/main/res/layout/trackable_activity.xml
+++ b/main/res/layout/viewpager_activity.xml
diff --git a/main/res/raw/license.txt b/main/res/raw/license.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/main/res/raw/license.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/main/res/values/strings.xml b/main/res/values/strings.xml
index e15ec2d..0e2f316 100644
--- a/main/res/values/strings.xml
+++ b/main/res/values/strings.xml
@@ -362,6 +362,8 @@
<string name="about_contributors">Contributors</string>
<string name="about_license">License</string>
<string name="about_apache_license"><a href="">Apache License, Version 2.0</a></string>
+ <string name="about_help">Help</string>
+ <string name="about_changes">Changes</string>
<!-- settings -->
<string name="settings_title_services">Services</string>
diff --git a/main/res/values/strings_not_translatable.xml b/main/res/values/strings_not_translatable.xml
index d9f803a..37f0eaa 100644
--- a/main/res/values/strings_not_translatable.xml
+++ b/main/res/values/strings_not_translatable.xml
@@ -40,7 +40,7 @@
<string name="settings_facebook_login_url" translatable="false">http://faq.cgeo.org/#1_38</string>
<!-- contributors -->
- <string name="contributors" translatable="false">\n
+ <string name="contributors" translatable="false">
· <a href="http://carnero.cc/">carnero</a> as the father of c:geo\n
\n
· 0xErnie (localization DE)\n
diff --git a/main/src/cgeo/geocaching/AboutActivity.java b/main/src/cgeo/geocaching/AboutActivity.java
index 029249e..7a8bea6 100644
--- a/main/src/cgeo/geocaching/AboutActivity.java
+++ b/main/src/cgeo/geocaching/AboutActivity.java
@@ -1,94 +1,208 @@
package cgeo.geocaching;
-import cgeo.geocaching.activity.AbstractActivity;
+import butterknife.InjectView;
+import butterknife.Views;
+
+import cgeo.geocaching.activity.AbstractViewPagerActivity;
+import cgeo.geocaching.ui.AbstractCachingPageViewCreator;
import cgeo.geocaching.ui.AnchorAwareLinkMovementMethod;
import cgeo.geocaching.utils.Version;
-import com.googlecode.androidannotations.annotations.AfterViews;
-import com.googlecode.androidannotations.annotations.Click;
-import com.googlecode.androidannotations.annotations.EActivity;
-import com.googlecode.androidannotations.annotations.ViewById;
-
import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
+import android.widget.ScrollView;
import android.widget.TextView;
-@EActivity
-public class AboutActivity extends AbstractActivity {
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Scanner;
- @ViewById(R.id.about_version_string) protected TextView version;
- @ViewById(R.id.contributors) protected TextView contributors;
- @ViewById(R.id.changelog_master) protected TextView changeLogMaster;
- @ViewById(R.id.changelog_release) protected TextView changeLogRelease;
+public class AboutActivity extends AbstractViewPagerActivity<AboutActivity.Page> {
+
+ class LicenseViewCreator extends AbstractCachingPageViewCreator<ScrollView> {
+
+ @InjectView(R.id.license) protected TextView licenseLink;
+ @InjectView(R.id.license_text) protected TextView licenseText;
+
+ @Override
+ public ScrollView getDispatchedView() {
+ final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_license_page, null);
+ Views.inject(this, view);
+ setClickListener(licenseLink, "http://www.apache.org/licenses/LICENSE-2.0.html");
+ licenseText.setText(getRawResourceString(R.raw.license));
+ return view;
+ }
+ }
+
+ class ContributorsViewCreator extends AbstractCachingPageViewCreator<ScrollView> {
+
+ @InjectView(R.id.contributors) protected TextView contributors;
+
+ @Override
+ public ScrollView getDispatchedView() {
+ final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_contributors_page, null);
+ Views.inject(this, view);
+ contributors.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
+ return view;
+ }
- @Override
- public void onCreate(final Bundle savedInstanceState) {
- // TODO remove this after the theme has been fixed
- super.onCreate(savedInstanceState, R.layout.about_activity);
}
- @AfterViews
- final void initializeViews() {
- version.setText(Version.getVersionName(this));
- contributors.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
- changeLogRelease.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
- final String changeLogMasterString = getString(R.string.changelog_master);
- if (StringUtils.isBlank(changeLogMasterString)) {
- changeLogMaster.setVisibility(View.GONE);
- } else {
- changeLogMaster.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
+ class ChangeLogViewCreator extends AbstractCachingPageViewCreator<ScrollView> {
+
+ @InjectView(R.id.changelog_master) protected TextView changeLogMaster;
+ @InjectView(R.id.changelog_release) protected TextView changeLogRelease;
+
+ @Override
+ public ScrollView getDispatchedView() {
+ final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_changes_page, null);
+ Views.inject(this, view);
+ changeLogRelease.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
+ final String changeLogMasterString = getString(R.string.changelog_master);
+ if (StringUtils.isBlank(changeLogMasterString)) {
+ changeLogMaster.setVisibility(View.GONE);
+ } else {
+ changeLogMaster.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
+ }
+ return view;
}
+
}
- @Click(R.id.donate)
- final void donate() {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FMLNN8GXZKJEE")));
+ class HelpViewCreator extends AbstractCachingPageViewCreator<ScrollView> {
+
+ @InjectView(R.id.support) protected TextView support;
+ @InjectView(R.id.website) protected TextView website;
+ @InjectView(R.id.facebook) protected TextView facebook;
+ @InjectView(R.id.twitter) protected TextView twitter;
+ @InjectView(R.id.nutshellmanual) protected TextView nutshellmanual;
+ @InjectView(R.id.market) protected TextView market;
+ @InjectView(R.id.faq) protected TextView faq;
+
+ @Override
+ public ScrollView getDispatchedView() {
+ final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_help_page, null);
+ Views.inject(this, view);
+ setClickListener(support, "mailto:support@cgeo.org");
+ setClickListener(website, "http://www.cgeo.org/");
+ setClickListener(facebook, "http://www.facebook.com/pages/cgeo/297269860090");
+ setClickListener(twitter, "http://twitter.com/android_gc");
+ setClickListener(nutshellmanual, "http://manual.cgeo.org/");
+ setClickListener(faq, "http://faq.cgeo.org/");
+ market.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(final View v) {
+ market();
+ }
+ });
+ return view;
+ }
+
}
- @Click(R.id.support)
- final void support() {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("mailto:support@cgeo.org")));
+ class VersionViewCreator extends AbstractCachingPageViewCreator<ScrollView> {
+
+ @InjectView(R.id.about_version_string) protected TextView version;
+ @InjectView(R.id.donate) protected TextView donateButton;
+
+ @Override
+ public ScrollView getDispatchedView() {
+ final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_version_page, null);
+ Views.inject(this, view);
+ version.setText(Version.getVersionName(AboutActivity.this));
+ setClickListener(donateButton, "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FMLNN8GXZKJEE");
+ return view;
+ }
}
- @Click(R.id.website)
- final void webSite() {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.cgeo.org/")));
+ enum Page {
+ VERSION(R.string.about_version),
+ HELP(R.string.about_help),
+ CHANGELOG(R.string.about_changes),
+ CONTRIBUTORS(R.string.about_contributors),
+ LICENSE(R.string.about_license);
+
+ private final int resourceId;
+
+ Page(final int resourceId) {
+ this.resourceId = resourceId;
+ }
}
- @Click(R.id.facebook)
- final void facebook() {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.facebook.com/pages/cgeo/297269860090")));
+ @Override
+ public final void onCreate(final Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState, R.layout.viewpager_activity);
+ createViewPager(0, null);
+ reinitializeViewPager();
}
- @Click(R.id.twitter)
- final void twitter() {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://twitter.com/android_gc")));
+ public final void setClickListener(final View view, final String url) {
+ view.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(final View v) {
+ startUrl(url);
+ }
+ });
}
- @Click(R.id.nutshellmanual)
- final void nutshellmanual() {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://manual.cgeo.org/")));
+ private void startUrl(final String url) {
+ startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
}
- @Click(R.id.market)
final void market() {
final Intent marketIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + getPackageName()));
marketIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
startActivity(marketIntent);
}
- @Click(R.id.license)
- final void license() {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.apache.org/licenses/LICENSE-2.0.html")));
+ @Override
+ protected final cgeo.geocaching.activity.AbstractViewPagerActivity.PageViewCreator createViewCreator(final Page page) {
+ switch (page) {
+ case VERSION:
+ return new VersionViewCreator();
+ case HELP:
+ return new HelpViewCreator();
+ case CHANGELOG:
+ return new ChangeLogViewCreator();
+ case CONTRIBUTORS:
+ return new ContributorsViewCreator();
+ case LICENSE:
+ return new LicenseViewCreator();
+ default:
+ throw new IllegalArgumentException();
+ }
+ }
+
+ @Override
+ protected final String getTitle(final Page page) {
+ return res.getString(page.resourceId);
+ }
+
+ @Override
+ protected final Pair<List<? extends Page>, Integer> getOrderedPages() {
+ final List<Page> pages = Arrays.asList(Page.values());
+ return new ImmutablePair<List<? extends Page>, Integer>(pages, 0);
}
- @Click(R.id.faq)
- final void faq() {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://faq.cgeo.org/")));
+ private String getRawResourceString(final int resourceId) {
+ final InputStream ins = res.openRawResource(resourceId);
+ final String result = new Scanner(ins).useDelimiter("\\A").next();
+ try {
+ ins.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return result;
}
}
diff --git a/main/src/cgeo/geocaching/MainActivity.java b/main/src/cgeo/geocaching/MainActivity.java
index a3daf97..0fd6759 100644
--- a/main/src/cgeo/geocaching/MainActivity.java
+++ b/main/src/cgeo/geocaching/MainActivity.java
@@ -736,7 +736,7 @@ public class MainActivity extends AbstractActivity {
* unused here but needed since this method is referenced from XML layout
*/
public void showAbout(final View view) {
- AboutActivity_.intent(this).start();
+ startActivity(new Intent(this, AboutActivity.class));
}
/**
diff --git a/main/src/cgeo/geocaching/TrackableActivity.java b/main/src/cgeo/geocaching/TrackableActivity.java
index 35ffdc6..20a9ccf 100644
--- a/main/src/cgeo/geocaching/TrackableActivity.java
+++ b/main/src/cgeo/geocaching/TrackableActivity.java
@@ -110,7 +110,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
@Override
public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState, R.layout.trackable_activity);
+ super.onCreate(savedInstanceState, R.layout.viewpager_activity);
// set title in code, as the activity needs a hard coded title due to the intent filters
setTitle(res.getString(R.string.trackable));