Popup: toast()
トーストを生成します。
構文
Popup.toast(container) => AlierView
Popup.toast(container, seconds) => AlierView
引数
-
container
:string
トーストに表示したい文字列です。
-
seconds
:number
トーストを表示する秒数です。この引数が省略された場合は1が割り当てられます。
返値: AlierView
生成されたトーストが入った AlierView
です。
例
Popup.toast("toast any text"); //表示後1秒で閉じる
Popup.toast("toast any text", 3); //表示後3秒で閉じる
解説
引数container
で渡した文字列が書かれたトーストが表示されます。引数seconds
で渡した秒数が経過するとトーストが閉じます。引数seconds
を省略した場合は1秒でトーストが閉じます。