デフォルトのToast:
Context context = getApplicationContext();
CharSequence text = "トーストを表示";
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, text, duration);
toast.show();
ライブラリ名:FancyToast-Android
リンク:https://github.com/Shashank02051997/FancyToast-Android
ライブラリを取り込み方:
${module}/build.gradleに下記を追記する。
dependencies {
...
compile 'com.github.Shashank02051997:FancyToast-Android:0.1.3'
}
使い方:
サンプルコード:
FancyToast.makeText(this,"Hello World !",FancyToast.LENGTH_LONG,FancyToast.DEFAULT,true);