Package io.scanbot.sdk.ui.view.widget
Class ToastView
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.ViewManager,android.view.ViewParent,android.view.accessibility.AccessibilityEventSource
public final class ToastView extends FrameLayout
Allows to show a message in toast-like style
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumToastView.Duration
-
Field Summary
Fields Modifier and Type Field Description public final static LongDURATION_SHORTpublic final static LongDURATION_LONG
-
Constructor Summary
Constructors Constructor Description ToastView(Context context, AttributeSet attrs)
-
Method Summary
Modifier and Type Method Description final UnitshowToast(String text, ToastView.Duration duration)Shows a message and than hides itself final UnitsetTextColor(Integer color)Allows to set the color of text final UnitsetToastBackgroundColor(Integer color)Allows to set the background color of the view -
-
Constructor Detail
-
ToastView
ToastView(Context context, AttributeSet attrs)
-
-
Method Detail
-
showToast
final Unit showToast(String text, ToastView.Duration duration)
Shows a message and than hides itself
- Parameters:
text- text of the messageduration- delay after which the view will be hidden
-
setTextColor
final Unit setTextColor(Integer color)
Allows to set the color of text
-
setToastBackgroundColor
final Unit setToastBackgroundColor(Integer color)
Allows to set the background color of the view
-
-
-
-