diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-08-03 18:39:21 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-08-03 18:39:21 +0200 |
commit | 2ccb2f792b601198536a8da765c61d15385a4eaf (patch) | |
tree | 91a4c4926f35ca1c3a02e87338819b3bfc330777 | |
parent | 090b5f48e4e7e23a8576607760626f4e5041f3be (diff) |
Donate with paypal ...
-rw-r--r-- | res/layout/about.xml | 11 | ||||
-rw-r--r-- | res/values/strings.xml | 1 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/AboutFragment.java | 11 |
3 files changed, 22 insertions, 1 deletions
diff --git a/res/layout/about.xml b/res/layout/about.xml index 6e7f48e2..b9c84ff2 100644 --- a/res/layout/about.xml +++ b/res/layout/about.xml @@ -38,6 +38,15 @@ android:layout_height="10sp" /> <TextView + android:id="@+id/donatestring" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + <Space + android:layout_width="match_parent" + android:layout_height="10sp" /> + + <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:autoLink="all" @@ -51,10 +60,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/copyright_others" /> + <Space android:layout_width="match_parent" android:layout_height="10sp" /> - <TextView android:layout_width="match_parent" diff --git a/res/values/strings.xml b/res/values/strings.xml index dcdeb095..3627f30a 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -241,4 +241,5 @@ <string name="using_proxy">Using proxy %1$s %2$d</string> <string name="use_system_proxy">Use system proxy</string> <string name="use_system_proxy_summary">Use the system wide configuration for HTTP/HTTPS proxies to connect.</string> + <string name="donatewithpaypal">You can <a href=\"https://www.paypal.com/cgi-bin/webscr?hosted_button_id=R2M6ZP9AF25LS&amp;cmd=_s-xclick\">donate with PayPal</a> </string> </resources> diff --git a/src/de/blinkt/openvpn/AboutFragment.java b/src/de/blinkt/openvpn/AboutFragment.java index 77132299..b30b95f3 100644 --- a/src/de/blinkt/openvpn/AboutFragment.java +++ b/src/de/blinkt/openvpn/AboutFragment.java @@ -4,6 +4,9 @@ import android.app.Fragment; import android.content.pm.PackageInfo; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; +import android.text.Html; +import android.text.Spanned; +import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -35,6 +38,14 @@ public class AboutFragment extends Fragment { ver.setText(getString(R.string.version_info,name,version)); + + TextView paypal = (TextView) v.findViewById(R.id.donatestring); + + String donatetext = getActivity().getString(R.string.donatewithpaypal); + Spanned htmltext = Html.fromHtml(donatetext); + paypal.setText(htmltext); + paypal.setMovementMethod(LinkMovementMethod.getInstance()); + return v; } |