📅  最后修改于: 2022-03-11 14:52:28.001000             🧑  作者: Mango
implementation 'com.tapadoo.android:alerter:2.0.4'
Alerter.create(BaseActivity.this)
.setTitle("Alert Title")
.setText("Alert Text")
.setIcon(R.drawable.ic_twotone_notifications_active_24)
.setBackgroundColorRes(R.color.colorAccent)
.setDuration(5000)
.enableSwipeToDismiss() //seems to not work well with OnClickListener
.enableProgress(true)
.setProgressColorRes(R.color.colorPrimary)
.show();