From 1d255d2d57314a3b8653fedcc53c6cf68958c389 Mon Sep 17 00:00:00 2001 From: Forrest Guice Date: Sat, 10 Feb 2024 18:59:00 -0700 Subject: [PATCH] donate Adds a donation link to the about dialog; https://forrestguice.github.io/SuntimesWidget/donate Suntimes Calendars is available gratis, but if it has proven its value, please pay as you like. --- .../calendar/ui/AboutDialog.java | 14 ++++++ .../main/res/layout/layout_dialog_about.xml | 43 ++++++++++++++----- app/src/main/res/values-eo/strings.xml | 4 ++ app/src/main/res/values-pl/strings.xml | 4 ++ app/src/main/res/values-zh-rTW/strings.xml | 4 ++ app/src/main/res/values/strings.xml | 4 ++ 6 files changed, 63 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/forrestguice/suntimeswidget/calendar/ui/AboutDialog.java b/app/src/main/java/com/forrestguice/suntimeswidget/calendar/ui/AboutDialog.java index 52aab500..4d6c5d7a 100644 --- a/app/src/main/java/com/forrestguice/suntimeswidget/calendar/ui/AboutDialog.java +++ b/app/src/main/java/com/forrestguice/suntimeswidget/calendar/ui/AboutDialog.java @@ -36,6 +36,8 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.CheckBox; +import android.widget.CompoundButton; import android.widget.TextView; import com.forrestguice.suntimescalendars.BuildConfig; @@ -147,6 +149,18 @@ public void onClick(View v) supportView.setMovementMethod(LinkMovementMethod.getInstance()); supportView.setText(Utils.fromHtml(context.getString(R.string.app_support_url))); + final TextView donateView = (TextView) dialogContent.findViewById(R.id.text_about_donate); + donateView.setMovementMethod(LinkMovementMethod.getInstance()); + donateView.setText(Utils.fromHtml(context.getString(R.string.app_donate_url, context.getString(R.string.app_name)))); + donateView.setVisibility(View.GONE); + + CheckBox checkDonate = (CheckBox) dialogContent.findViewById(R.id.check_donate); + checkDonate.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + donateView.setVisibility(isChecked ? View.VISIBLE : View.GONE); + } + }); + TextView legalView1 = (TextView) dialogContent.findViewById(R.id.txt_about_legal1); legalView1.setMovementMethod(LinkMovementMethod.getInstance()); legalView1.setText(Utils.fromHtml(context.getString(R.string.app_legal1))); diff --git a/app/src/main/res/layout/layout_dialog_about.xml b/app/src/main/res/layout/layout_dialog_about.xml index e64c5522..76e67924 100644 --- a/app/src/main/res/layout/layout_dialog_about.xml +++ b/app/src/main/res/layout/layout_dialog_about.xml @@ -96,16 +96,39 @@ android:textSize="?attr/text_size_small" android:text="@string/app_legal1" android:autoLink="web" /> - + + + + + + + + + + + + + Subteno: vizitu la erar‑spurilon por raporti problemon. ]]> + konsideri donaci ajnan monkvanton. + ]]> Fontkodo disponebla laŭ la permesilo GPLv3. diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 3e0627ef..5ef72fdf 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -298,6 +298,10 @@ Wersja:]]> %s Dodatek do apki Czasy Słońca: integracja z kalendarzem. Wsparcie: odwiedź stronę trackera błędów aby zgłosić błąd/sugestię.]]> + rozważyć wpłatę dowolnej kwoty. + ]]> Kod źródłowy dostępny na licencji GPLv3.]]> Tłumaczenia:
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index bc76e37a..d590e68a 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -146,6 +146,10 @@ Support: visit the issue tracker to submit a request. ]]>
+ 隨意付費。 + ]]> forrestguice.github.io/SuntimesWidget ]]> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 54973ab3..a30e0a0d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -433,6 +433,10 @@ forrestguice.github.io/SuntimesWidget ]]> + pay as you like. + ]]> Source Code:
Copyright © 2018-2024 Forrest Guice