diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-05-11 14:59:06 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-05-11 14:59:06 +0200 |
| commit | d03e2b1c6a7592b88f7c2c8de01f6978d5429e24 (patch) | |
| tree | a9b79c45eb2738c0b2e2eb1925b748c2fea84995 | |
| parent | 4e6111aacd050a4c2f3aabb8ef6c851f1d13728b (diff) | |
| download | cgeo-d03e2b1c6a7592b88f7c2c8de01f6978d5429e24.zip cgeo-d03e2b1c6a7592b88f7c2c8de01f6978d5429e24.tar.gz cgeo-d03e2b1c6a7592b88f7c2c8de01f6978d5429e24.tar.bz2 | |
new: link to market place in about activity
| -rw-r--r-- | main/res/layout/about_activity.xml | 17 | ||||
| -rw-r--r-- | main/res/values/strings.xml | 1 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/AboutActivity.java | 10 |
3 files changed, 28 insertions, 0 deletions
diff --git a/main/res/layout/about_activity.xml b/main/res/layout/about_activity.xml index b0de7ea..3f4ca00 100644 --- a/main/res/layout/about_activity.xml +++ b/main/res/layout/about_activity.xml @@ -197,6 +197,23 @@ android:textColorLink="?text_color_link" android:textSize="14dip" /> + <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:onClick="market" + android:text="@string/market" + android:textColor="?text_color" + android:textColorLink="?text_color_link" + android:textSize="14dip" /> + <RelativeLayout style="@style/separator_horizontal_layout" > <View style="@style/separator_horizontal" /> diff --git a/main/res/values/strings.xml b/main/res/values/strings.xml index c17e243..5d0b15f 100644 --- a/main/res/values/strings.xml +++ b/main/res/values/strings.xml @@ -1061,6 +1061,7 @@ <string name="facebook">Facebook: <a href="http://www.facebook.com/pages/cgeo/297269860090">c:geo page</a></string> <string name="twitter">Twitter: <a href="http://twitter.com/android_gc">@android_GC</a></string> <string name="nutshellmanual">Manual: <a href="http://manual.cgeo.org/">c:geo in a Nutshell</a></string> + <string name="market">Android: <a href="https://play.google.com/store/apps/details?id=cgeo.geocaching">c:geo on Google Play</a></string> <string name="about_twitter">Should <b>c:geo</b> publish a new status on Twitter every time you log a cache?</string> <string name="about_auth_1">The following process allows <b>c:geo</b> to access Twitter - if agreed.</string> <string name="about_auth_2">A click on the \"authorize c:geo\" button will start the process. This process will open up a web browser with a Twitter page. Login on this page and allow <b>c:geo</b> to access your account. If this is accepted, Twitter will show up a numeric PIN code. This PIN must be pasted into <b>c:geo</b> and confirmed. That\'s all.</string> diff --git a/main/src/cgeo/geocaching/AboutActivity.java b/main/src/cgeo/geocaching/AboutActivity.java index d14df7b..83f25e9 100644 --- a/main/src/cgeo/geocaching/AboutActivity.java +++ b/main/src/cgeo/geocaching/AboutActivity.java @@ -73,4 +73,14 @@ public class AboutActivity extends AbstractActivity { public void nutshellmanual(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 market(View view) { + 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); + } } |
