/**
* Shows the selection dialog for a given renderer.
*
* @param rendererIndex The index of the renderer.
* @param callback The callback interface when the dialog is dismissed
*/
public void showSelectionDialog(int rendererIndex, @NonNull TrackSelectionHelperInterface callback) {
this.mCallbackInterface = callback;
qualityDialogView = new TubiQualityDialogView(mActivity);
qualityDialogView.setAdaptiveTrackSelectionFactory(adaptiveTrackSelectionFactory);
MaterialDialog.Builder materialBuilder = new MaterialDialog.Builder(mActivity);
materialBuilder.customView(qualityDialogView.buildQualityDialog(selector, rendererIndex), false)
.title(mActivity.getResources().getString(R.string.track_selector_alert_quality_title))
.backgroundColor(mActivity.getResources().getColor(R.color.tubi_tv_steel_grey))
.positiveText(android.R.string.ok)
.positiveColor(mActivity.getResources().getColor(R.color.tubi_tv_golden_gate))
.onPositive(qualityDialogView)
.dismissListener(this)
.show();
}
java类com.afollestad.materialdialogs.MaterialDialog的实例源码
TrackSelectionHelper.java 文件源码
项目:TubiPlayer
阅读 21
收藏 0
点赞 0
评论 0
MyScriptListFragment.java 文件源码
项目:https-github.com-hyb1996-NoRootScriptDroid
阅读 25
收藏 0
点赞 0
评论 0
@Optional
@OnClick(R.id.delete)
void deleteScriptFile() {
dismissDialogs();
new MaterialDialog.Builder(getActivity())
.title(R.string.delete_confirm)
.positiveText(R.string.cancel)
.negativeText(R.string.ok)
.onNegative(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
doDeletingScriptFile();
}
})
.show();
}
MyScriptListFragment.java 文件源码
项目:https-github.com-hyb1996-NoRootScriptDroid
阅读 32
收藏 0
点赞 0
评论 0
@Override
public void onInput(@NonNull MaterialDialog dialog, CharSequence input) {
if (mIsFirstTextChanged) {
mIsFirstTextChanged = false;
return;
}
EditText editText = dialog.getInputEditText();
if (editText == null)
return;
int errorResId = 0;
if (input == null || input.length() == 0) {
errorResId = R.string.text_name_should_not_be_empty;
} else if (!input.equals(mExcluded)) {
if (new File(getCurrentDirectory(), mIsDirectory ? input.toString() : input.toString() + ".js").exists()) {
errorResId = R.string.text_file_exists;
}
}
if (errorResId == 0) {
editText.setError(null);
dialog.getActionButton(DialogAction.POSITIVE).setEnabled(true);
} else {
editText.setError(getString(errorResId));
dialog.getActionButton(DialogAction.POSITIVE).setEnabled(false);
}
}
AddPlaylistDialog.java 文件源码
项目:Hello-Music-droid
阅读 25
收藏 0
点赞 0
评论 0
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final List<Playlist> playlists = PlaylistLoader.getPlaylists(getActivity(), false);
CharSequence[] chars = new CharSequence[playlists.size() + 1];
chars[0] = "Create new playlist";
for (int i = 0; i < playlists.size(); i++) {
chars[i + 1] = playlists.get(i).name;
}
return new MaterialDialog.Builder(getActivity()).title("Add to playlist").items(chars).itemsCallback(new MaterialDialog.ListCallback() {
@Override
public void onSelection(MaterialDialog dialog, View itemView, int which, CharSequence text) {
long[] songs = getArguments().getLongArray("songs");
if (which == 0) {
CreatePlaylistDialog.newInstance(songs).show(getActivity().getSupportFragmentManager(), "CREATE_PLAYLIST");
return;
}
MusicPlayer.addToPlaylist(getActivity(), songs, playlists.get(which - 1).id);
dialog.dismiss();
}
}).build();
}
MainActivity.java 文件源码
项目:ScanLinks
阅读 19
收藏 0
点赞 0
评论 0
public void showFirstRunDialog() {
MaterialDialog frDialog = new MaterialDialog.Builder(this)
.title(getString(R.string.welcome_app_dialog_title))
.content(getString(R.string.welcome_app_text))
.positiveText(getString(R.string.welcome_app_dialog_positive_text))
.cancelable(false)
.autoDismiss(false)
.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
dialog.dismiss();
Prefs.putBoolean("firstRun", false);
}
})
.build();
frDialog.show();
}
CircularMenu.java 文件源码
项目:Auto.js
阅读 23
收藏 0
点赞 0
评论 0
@Optional
@OnClick(R.id.script_list)
void showScriptList() {
mWindow.collapse();
ScriptListView listView = new ScriptListView(mContext);
listView.setStorageFileProvider(StorageFileProvider.getDefault());
listView.setDirectorySpanSize(2);
final MaterialDialog dialog = new ThemeColorMaterialDialogBuilder(mContext)
.title(R.string.text_run_script)
.customView(listView, false)
.positiveText(R.string.cancel)
.build();
listView.setOnItemOperatedListener(file -> dialog.dismiss());
listView.setOnScriptFileClickListener((view, file) -> Scripts.run(file));
DialogUtils.showDialog(dialog);
}
WelcomeActivity.java 文件源码
项目:quire
阅读 30
收藏 0
点赞 0
评论 0
@Override
public void show500ServerError() {
builder = new MaterialDialog.Builder(mContext)
.title(R.string.all_dialog_server_error)
.content(R.string.all_dialog_try_again)
.positiveText(R.string.all_dialog_positive).onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
dialog.dismiss();
}
});
dialog = builder.build();
dialog.show();
dialog.setCanceledOnTouchOutside(false);
}
PlayListPicker.java 文件源码
项目:MusicX-music-player
阅读 25
收藏 0
点赞 0
评论 0
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
View rootView = LayoutInflater.from(getContext()).inflate(R.layout.playlist_picker, new LinearLayout(getContext()), false);
rv = (RecyclerView) rootView.findViewById(R.id.rv);
MaterialDialog.Builder pickDialog = new MaterialDialog.Builder(getContext());
pickDialog.title(R.string.choose_playlist);
playlistListAdapter = new PlaylistListAdapter(getContext());
playlistListAdapter.setOnItemClickListener(onClick);
CustomLayoutManager customLayoutManager = new CustomLayoutManager(getContext());
customLayoutManager.setSmoothScrollbarEnabled(true);
rv.addItemDecoration(new DividerItemDecoration(getContext(), 75, false));
rv.setLayoutManager(customLayoutManager);
rv.setAdapter(playlistListAdapter);
ateKey = Helper.getATEKey(getContext());
colorAccent = Config.accentColor(getContext(), ateKey);
CreatePlaylist = (Button) rootView.findViewById(R.id.create_playlist);
CreatePlaylist.setOnClickListener(mOnClickListener);
CreatePlaylist.setBackgroundColor(colorAccent);
pickDialog.customView(rootView, false);
loadPlaylist();
return pickDialog.show();
}
NurseMainActivity.java 文件源码
项目:Nearby
阅读 19
收藏 0
点赞 0
评论 0
@Override
public void onBackPressed() {
new MaterialDialog.Builder(this)
.title(R.string.ok)
.content(R.string.are_you_finish_app)
.positiveText(R.string.finish)
.negativeText(R.string.cancel)
.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
Intent intent = new Intent(getApplicationContext(), StartActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("EXIT", true);
startActivity(intent);
finish();
}
})
.show();
}
InsideCheckActivity.java 文件源码
项目:JKCloud
阅读 20
收藏 0
点赞 0
评论 0
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
switch (msg.what) {
case GET_ERROR:
case GET_SUCCESS:
dismissLoading();
/*发送广播获取待审核数量*/
Intent intent = new Intent("REFRESH_COUNT");
sendBroadcast(intent);
new MaterialDialog.Builder(InsideCheckActivity.this)
.content((String) msg.obj)
.title("系统提示")
.canceledOnTouchOutside(false)
.positiveText("确定")
.onPositive((dialog, which) -> {
finish();
})
.show();
break;
default:
break;
}
}
MainActivity.java 文件源码
项目:QiangHongBao
阅读 18
收藏 0
点赞 0
评论 0
private void showHintDialog() {
PackageInfo weChat = PackageUtils.getPackageInfo(Config.PACKAGE_NAME_WX);
PackageInfo qq = PackageUtils.getPackageInfo(Config.PACKAGE_NAME_QQ);
PackageInfo tim = PackageUtils.getPackageInfo(Config.PACKAGE_NAME_TIM);
String msg = "";
if(weChat != null && weChat.versionCode < WeChatConfig.V_1080){
msg += "微信、";
}
if(qq != null && qq.versionCode < QQConfig.V_718){
msg += "QQ、";
}
if(tim != null && tim.versionCode < TIMConfig.V_938){
msg += "TIM、";
}
if (!TextUtils.isEmpty(msg)) {
msg = msg.substring(0, msg.length() - 1);
new MaterialDialog.Builder(this)
.title("提示")
.content("当前" + msg + "版本过低,可能导致抢红包失败!请及时更新到" + msg + "最新版")
.positiveText("我知道了")
.show();
}
}
SplashPresenter.java 文件源码
项目:anitrend-app
阅读 39
收藏 0
点赞 0
评论 0
public void requestAppReset() {
new DialogManager(mContext).createDialogMessage("Authentication Error", Html.fromHtml(mContext.getString(R.string.app_splash_authenticating_message)),
mContext.getString(R.string.Yes), mContext.getString(R.string.No), new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
switch (which) {
case POSITIVE:
makeAlerterInfo("Application has been reset!");
ServiceGenerator.authStateChange(mContext);
new ApplicationPrefs(mContext).setUserDeactivated();
mContext.onRefresh();
break;
case NEGATIVE:
dialog.dismiss();
break;
}
}
});
}
PlayServicesUtils.java 文件源码
项目:MyAnimeViewer
阅读 22
收藏 0
点赞 0
评论 0
/**
* Check the device to make sure it has the Google Play Services APK. If
* it doesn't, display a dialog that allows users to download the APK from
* the Google Play Store or enable it in the device's system settings.
*/
public static boolean checkPlayServices(AppCompatActivity activity, int PLAY_SERVICES_RESOLUTION_REQUEST) {
GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();
int resultCode = apiAvailability.isGooglePlayServicesAvailable(activity);
if (resultCode != ConnectionResult.SUCCESS) {
if (apiAvailability.isUserResolvableError(resultCode)) {
apiAvailability.getErrorDialog(activity, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)
.show();
} else {
MaterialDialog dialog = new MaterialDialog.Builder(activity)
.content("This device is not supported.")
.show();
}
return false;
}
return true;
}
PlaylistHelper.java 文件源码
项目:MusicX-music-player
阅读 21
收藏 0
点赞 0
评论 0
/**
* Delete playlist Dialog
*
* @param context
* @param Playlistname
*/
public static void deletePlaylistDailog(@NonNull Context context, String Playlistname, RefreshPlaylist refreshPlaylist) {
MaterialDialog.Builder builder = new MaterialDialog.Builder(context);
builder.title(Playlistname);
builder.content(R.string.deleteplaylist);
builder.positiveText(R.string.delete);
builder.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
deletePlaylist(context, Playlistname);
Toast.makeText(context, Playlistname + " Deleted", Toast.LENGTH_SHORT).show();
refreshPlaylist.refresh();
}
});
builder.typeface(Helper.getFont(context), Helper.getFont(context));
builder.negativeText(R.string.cancel);
builder.show();
}
Helper.java 文件源码
项目:MusicX-music-player
阅读 35
收藏 0
点赞 0
评论 0
/**
* GuideLines Dialog
*
* @param context
*/
public static void GuidLines(Context context) {
MaterialDialog.Builder builder = new MaterialDialog.Builder(context);
builder.title("GuideLines");
WebView webView = new WebView(context);
webView.loadUrl("file:///android_asset/Guidlines.html");
builder.positiveText(android.R.string.ok);
builder.typeface(getFont(context),getFont(context));
builder.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
dialog.dismiss();
}
});
builder.customView(webView, false);
builder.build();
builder.show();
}
ColorChooserDialog.java 文件源码
项目:GitHub
阅读 33
收藏 0
点赞 0
评论 0
@Override
public void onClick(View v) {
if (v.getTag() != null) {
final String[] tag = ((String) v.getTag()).split(":");
final int index = Integer.parseInt(tag[0]);
final MaterialDialog dialog = (MaterialDialog) getDialog();
final Builder builder = getBuilder();
if (isInSub()) {
subIndex(index);
} else {
topIndex(index);
if (mColorsSub != null && index < mColorsSub.length) {
dialog.setActionButton(DialogAction.NEGATIVE, builder.mBackBtn);
isInSub(true);
}
}
if (builder.mAllowUserCustom)
selectedCustomColor = getSelectedColor();
invalidateDynamicButtonColors();
invalidate();
}
}
UpdateManager.java 文件源码
项目:JKCloud
阅读 20
收藏 0
点赞 0
评论 0
/**
* 显示软件下载对话框
*/
@SuppressLint("InflateParams")
private void showDownloadDialog() {
try {
LayoutInflater inflater = LayoutInflater.from(mContext);
View v = inflater.inflate(R.layout.update, null);
mProgress = (NumberProgressBar) v.findViewById(R.id.update_progress);
new MaterialDialog.Builder(mContext)
.title("正在下载")
.customView(v, false)
.negativeText("取消")
.onPositive((dialog, which) -> {
cancelUpdate = true;
}).show();
downloadApk();
} catch (Exception e) {
e.printStackTrace();
}
}
MainActivity.java 文件源码
项目:QiangHongBao
阅读 18
收藏 0
点赞 0
评论 0
private void exit() {
if(!QHBService.isRun()){
AppManager.getInstance().exitApp(true);
return;
}
new MaterialDialog.Builder(getActivity())
.title("退出服务")
.content("找到[快手抢红包],然后关闭服务再退出即可")
.negativeText("取消")
.positiveText("确认")
.onAny(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
switch (which) {
case POSITIVE:
getActivity().startActivity(new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS));
break;
}
}
})
.show();
}
AuthEditTextActivity.java 文件源码
项目:EasyAndroid
阅读 21
收藏 0
点赞 0
评论 0
public void onChangeTextLength(View view)
{
new MaterialDialog.Builder(getContext())
.items(R.array.auth_edit_text_length)
.alwaysCallInputCallback()
.itemsCallbackSingleChoice(0, new MaterialDialog.ListCallbackSingleChoice()
{
@Override
public boolean onSelection(MaterialDialog dialog, View itemView, int which,
CharSequence text)
{
authEditText.setTextLength(Convert.toInt(text.toString()));
return true;
}
}).show();
}
DialogHelper.java 文件源码
项目:javaide
阅读 33
收藏 0
点赞 0
评论 0
public static void showFilenameSuggestingDialog(final Context context,
final MaterialDialog.SingleButtonCallback callback,
final MaterialDialog.InputCallback inputCallback, int titleResId) {
MaterialDialog.Builder builder = new MaterialDialog.Builder(context);
builder.title(titleResId)
.negativeText(android.R.string.cancel)
.positiveText(android.R.string.ok)
.content(R.string.enter_filename)
.input("", "", inputCallback)
.onAny(callback);
MaterialDialog show = builder.show();
initFilenameInputDialog(show);
}
UpdateUserListingActivity.java 文件源码
项目:quire
阅读 24
收藏 0
点赞 0
评论 0
@Override
public void showNetworkError() {
builder = new MaterialDialog.Builder(mContext)
.title(R.string.all_dialog_network_error_title)
.content(R.string.all_dialog_try_again)
.positiveText(R.string.all_dialog_positive).onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
dialog.dismiss();
}
});
dialog = builder.build();
dialog.show();
dialog.setCanceledOnTouchOutside(false);
}
MainActivity.java 文件源码
项目:GitHub
阅读 22
收藏 0
点赞 0
评论 0
@SuppressWarnings("ConstantConditions")
@OnClick(R.id.list_longPress)
public void showListLongPress() {
index = 0;
new MaterialDialog.Builder(this)
.title(R.string.socialNetworks)
.items(R.array.socialNetworks)
.itemsCallback((dialog, view, which, text) -> showToast(which + ": " + text))
.autoDismiss(false)
.itemsLongCallback((dialog, itemView, position, text) -> {
dialog.getItems().remove(position);
dialog.notifyItemsChanged();
return false;
})
.onNeutral((dialog, which) -> {
index++;
dialog.getItems().add("Item " + index);
dialog.notifyItemInserted(dialog.getItems().size() - 1);
})
.neutralText(R.string.add_item)
.show();
}
MainActivity.java 文件源码
项目:GitHub
阅读 17
收藏 0
点赞 0
评论 0
@OnClick(R.id.multiChoice) public void showMultiChoice() {
new MaterialDialog.Builder(this).title(R.string.socialNetworks)
.items(R.array.socialNetworks)
.itemsCallbackMultiChoice(new Integer[]{1, 3}, (dialog, which, text) -> {
StringBuilder str = new StringBuilder();
for (int i = 0; i < which.length; i++) {
if (i > 0) str.append('\n');
str.append(which[i]);
str.append(": ");
str.append(text[i]);
}
showToast(str.toString());
return true; // allow selection
})
.onNeutral((dialog, which) -> dialog.clearSelectedIndices())
.onPositive((dialog, which) -> dialog.dismiss())
.alwaysCallMultiChoiceCallback()
.positiveText(R.string.md_choose_label)
.autoDismiss(false)
.neutralText(R.string.clear_selection)
.show();
}
SearchMedicineActivity.java 文件源码
项目:Nearby
阅读 21
收藏 0
点赞 0
评论 0
public void selectMedicine(final Medicine medicine){
String content = "";
content = "이 약을 새롭게 추가하겠습니까?\n\n" +
"약명 : " + medicine.getName() + "\n" +
"보험코드 : " + medicine.getCode() + "\n" +
"제조회사 : " + medicine.getCompany() + "\n" +
"용량 : " + medicine.getStandard() + medicine.getUnit();
new MaterialDialog.Builder(this)
.title(R.string.ok)
.content(content)
.positiveText(R.string.ok)
.negativeText(R.string.cancel)
.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
Intent intent = new Intent();
intent.putExtra("medicine", medicine);
setResult(SELECTED_MEDICINE, intent);
finish();
}
})
.show();
}
MainActivity.java 文件源码
项目:GitHub
阅读 26
收藏 0
点赞 0
评论 0
@OnClick(R.id.themed) public void showThemed() {
new MaterialDialog.Builder(this)
.title(R.string.useGoogleLocationServices)
.content(R.string.useGoogleLocationServicesPrompt)
.positiveText(R.string.agree)
.negativeText(R.string.disagree)
.positiveColorRes(R.color.material_red_400)
.negativeColorRes(R.color.material_red_400)
.titleGravity(GravityEnum.CENTER)
.titleColorRes(R.color.material_red_400)
.contentColorRes(android.R.color.white)
.backgroundColorRes(R.color.material_blue_grey_800)
.dividerColorRes(R.color.accent)
.btnSelector(R.drawable.md_btn_selector_custom, DialogAction.POSITIVE)
.positiveColor(Color.WHITE)
.negativeColorAttr(android.R.attr.textColorSecondaryInverse)
.theme(Theme.DARK)
.show();
}
LicenseCallbackHelper.java 文件源码
项目:wallpaperboard
阅读 28
收藏 0
点赞 0
评论 0
private void showLicenseDialog(LicenseHelper.Status status) {
int message = status == LicenseHelper.Status.SUCCESS ?
R.string.license_check_success : R.string.license_check_failed;
new MaterialDialog.Builder(mContext)
.typeface(TypefaceHelper.getMedium(mContext), TypefaceHelper.getRegular(mContext))
.title(R.string.license_check)
.content(message)
.positiveText(R.string.close)
.onPositive((dialog, which) -> {
onLicenseChecked(status);
dialog.dismiss();
})
.cancelable(false)
.canceledOnTouchOutside(false)
.show();
}
MainActivity.java 文件源码
项目:GitHub
阅读 19
收藏 0
点赞 0
评论 0
@OnClick(R.id.input_custominvalidation) public void showInputDialogCustomInvalidation() {
new MaterialDialog.Builder(this)
.title(R.string.input)
.content(R.string.input_content_custominvalidation)
.inputType(InputType.TYPE_CLASS_TEXT |
InputType.TYPE_TEXT_VARIATION_PERSON_NAME |
InputType.TYPE_TEXT_FLAG_CAP_WORDS)
.positiveText(R.string.submit)
.alwaysCallInputCallback() // this forces the callback to be invoked with every input change
.input(R.string.input_hint, 0, false, (dialog, input) -> {
if (input.toString().equalsIgnoreCase("hello")) {
dialog.setContent("I told you not to type that!");
dialog.getActionButton(DialogAction.POSITIVE).setEnabled(false);
} else {
dialog.setContent(R.string.input_content_custominvalidation);
dialog.getActionButton(DialogAction.POSITIVE).setEnabled(true);
}
}).show();
}
BookCatalogActivity.java 文件源码
项目:FriendBook
阅读 20
收藏 0
点赞 0
评论 0
private void showSectionSelectionDialog() {
if (dialog == null) {
RecyclerView recyclerView = new RecyclerView(this);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.addItemDecoration(new RecyclerViewItemDecoration.Builder(this)
.color(ContextCompat.getColor(this, R.color.colorDivider))
.thickness(1)
.create());
recyclerView.setAdapter(sectionAdapter);
dialog = new MaterialDialog.Builder(this)
.customView(recyclerView, true)
.build();
} else {
sectionAdapter.notifyDataSetChanged();
}
dialog.show();
}
ClearSmartPlaylistDialog.java 文件源码
项目:RetroMusicPlayer
阅读 22
收藏 0
点赞 0
评论 0
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
//noinspection unchecked
final AbsSmartPlaylist playlist = getArguments().getParcelable("playlist");
int title = R.string.clear_playlist_title;
//noinspection ConstantConditions
CharSequence content = Html.fromHtml(getString(R.string.clear_playlist_x, playlist.name));
return new MaterialDialog.Builder(getActivity())
.title(title)
.content(content)
.positiveText(R.string.clear_action)
.negativeText(android.R.string.cancel)
.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
if (getActivity() == null) {
return;
}
playlist.clear(getActivity());
}
})
.build();
}
BookcaseFragment.java 文件源码
项目:FriendBook
阅读 23
收藏 0
点赞 0
评论 0
private void showDeleteConfirmDialog() {
new MaterialDialog
.Builder(getActivity())
.title("确认删除")
.content("真的要将这" + bookcaseAdapter.getSelectedBookTbs().size() + "本书从书架中删除吗?")
.positiveText("删除")
.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
getPresenter().deleteItems(bookcaseAdapter.getSelectedBookTbs());
toggleEditMenu();
bookcaseAdapter.cancelEdit();
}
})
.negativeText("取消")
.show();
}