Android 的吐司式警示模式受到 Google Material Design 规范的启发
只需将以下内容添加到 build.gradle 中。
.withTextColorId(textColorId) .withBackGroundColorId(bgColorId) .withVisibilityChangeListener(this) .withStyle(style) .withDuration(duration) .show();
new SnackBar.Builder(getActivity().getApplicationContext(), root) .withOnClickListener(this) .withMessage("这个库太棒了!") // 或 .withMessageId(messageId) .withTypeFace(myAwesomeTypeFace) .withActionMessage("Action") // 或 .withActionMessageId(actionMsgId)
.withTextColorId(textColorId) .withBackGroundColorId(bgColorId) .withVisibilityChangeListener(this) .withStyle(style) .withDuration(duration) .show();
如果您
暂无开放 Issues,或尚未同步最近议题。