メインコンテンツまでスキップ

ToastParams():setTextSize()

トーストのテキストサイズを sp(scale-independent pixels)で設定します。

シグネチャ​

setTextSize(textSizeSp: number): ToastParams

パラメータ​

パラメータ型説明
textSizeSpnumbersp 単位のテキストサイズ。0 でアプリのデフォルトサイズを維持

戻り値

ToastParams を返すため、呼び出しをチェーンできます。

例​

Utils:toast("Large note", ToastParams():setTextSize(18):setDuration(2000))