Add "buy me a coffee" button because I'm broke af lol

This commit is contained in:
Davide Depau 2018-12-04 12:18:53 +01:00
parent 38eee00a62
commit 41a7b814a1
Signed by: depau
GPG key ID: C7D999B6A55EFE86
4 changed files with 16 additions and 0 deletions

View file

@ -14,6 +14,8 @@ import eu.depau.etchdroid.kotlin_exts.toast
import eu.depau.etchdroid.utils.DoNotShowAgainDialogFragment
import eu.depau.etchdroid.utils.NightModeHelper
import me.jfenn.attribouter.Attribouter
import android.content.Intent
import android.net.Uri
abstract class ActivityBase : AppCompatActivity() {
@ -88,6 +90,11 @@ abstract class ActivityBase : AppCompatActivity() {
.show()
return true
}
R.id.action_donate -> {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://etchdroid.depau.eu/donate/"))
startActivity(intent)
return true
}
R.id.action_reset_warnings -> {
getSharedPreferences(DISMISSED_DIALOGS_PREFS, 0)
.edit().clear().apply()

View file

@ -8,6 +8,12 @@
android:title="@string/about"
app:showAsAction="never"/>
<item
android:id="@+id/action_donate"
android:orderInCategory="100"
android:title="@string/buy_me_a_coffee"
app:showAsAction="never"/>
<item
android:id="@+id/action_nightmode"
android:orderInCategory="100"

View file

@ -110,4 +110,6 @@
<string name="file_type_not_supported">Dosya türü deskteklenmiyor</string>
<string name="cannot_find_file_in_storage">Dosya, dahili hafızanızda bulunamadı. Uygulamayı kullanarak seçmeyi deneyin.</string>
<string name="storage_permission_required">DMG dosyalarını okuyabilmek için depolama izni gerekmektedir.</string>
<string name="app_desc">Un\'applicazione per scrivere immagini di sistemi operativi su chiavette USB, su Android, senza root.</string>
<string name="buy_me_a_coffee">Pagami un caffè</string>
</resources>

View file

@ -151,5 +151,6 @@
<string name="library_Material_licenseId">apache_2_0</string>
<string name="app_desc">An application to write OS images to USB drives, on Android, no root required.</string>
<string name="buy_me_a_coffee">Buy me a coffee</string>
</resources>