aboutsummaryrefslogtreecommitdiff
path: root/taler-kotlin-android/src/main
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2022-10-27 10:15:52 -0300
committerTorsten Grote <t@grobox.de>2022-10-27 10:15:52 -0300
commit725562a48a23ed4d0153f05a5c36f4d17875c90c (patch)
treed9359e488f2f50424ec7eac9477ee198190431a4 /taler-kotlin-android/src/main
parent2398d0fb201b53b2e41bf9d549b293b6b93e2c45 (diff)
downloadtaler-android-725562a48a23ed4d0153f05a5c36f4d17875c90c.tar.gz
taler-android-725562a48a23ed4d0153f05a5c36f4d17875c90c.tar.bz2
taler-android-725562a48a23ed4d0153f05a5c36f4d17875c90c.zip
[wallet] Implement making deposits (not fully functional)
Diffstat (limited to 'taler-kotlin-android/src/main')
-rw-r--r--taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt12
1 files changed, 10 insertions, 2 deletions
diff --git a/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt b/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt
index 7dde872..c6d34e9 100644
--- a/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt
+++ b/taler-kotlin-android/src/main/java/net/taler/common/AndroidUtils.kt
@@ -97,13 +97,21 @@ fun Context.isOnline(): Boolean {
}
fun FragmentActivity.showError(mainText: String, detailText: String = "") = ErrorBottomSheet
- .newInstance(mainText, detailText)
- .show(supportFragmentManager, "ERROR_BOTTOM_SHEET")
+ .newInstance(mainText, detailText)
+ .show(supportFragmentManager, "ERROR_BOTTOM_SHEET")
fun FragmentActivity.showError(@StringRes mainId: Int, detailText: String = "") {
showError(getString(mainId), detailText)
}
+fun Fragment.showError(mainText: String, detailText: String = "") = ErrorBottomSheet
+ .newInstance(mainText, detailText)
+ .show(parentFragmentManager, "ERROR_BOTTOM_SHEET")
+
+fun Fragment.showError(@StringRes mainId: Int, detailText: String = "") {
+ showError(getString(mainId), detailText)
+}
+
fun Fragment.startActivitySafe(intent: Intent) {
try {
startActivity(intent)