Updated on 2026-08-14
This commit is contained in:
parent
d259fb3d4b
commit
1fd80738c6
4 changed files with 49 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ import com.google.android.material.snackbar.Snackbar
|
|||
import com.tangem.Constant
|
||||
import com.tangem.wallet.R
|
||||
|
||||
|
||||
class ToastHelper {
|
||||
|
||||
fun showSnackbarUpdateVersion(context: Context, vg: ViewGroup, versionName: String) {
|
||||
|
|
@ -24,6 +25,20 @@ class ToastHelper {
|
|||
}.show()
|
||||
}
|
||||
|
||||
fun showSnackbarSuccess(context: Context, vg: ViewGroup, message: String) {
|
||||
val snackbar = Snackbar.make(vg, message, Snackbar.LENGTH_INDEFINITE)
|
||||
snackbar.setAction(R.string.ok) {
|
||||
snackbar.dismiss()
|
||||
}
|
||||
snackbar.show()
|
||||
}
|
||||
|
||||
fun showSnackbarError(context: Context, vg: ViewGroup, message: String) {
|
||||
val snackbar = Snackbar.make(vg, message, Snackbar.LENGTH_INDEFINITE)
|
||||
snackbar.setAction(R.string.ok) {
|
||||
snackbar.dismiss()
|
||||
}
|
||||
snackbar.show()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.tangem.di
|
||||
|
||||
import com.tangem.ui.PrepareTransactionActivity
|
||||
import com.tangem.ui.activity.MainActivity
|
||||
import dagger.Component
|
||||
import javax.inject.Singleton
|
||||
|
|
@ -10,4 +11,6 @@ interface ToastHelperComponent {
|
|||
|
||||
fun inject(activity: MainActivity)
|
||||
|
||||
fun inject(activity: PrepareTransactionActivity)
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue