當前位置: 首頁>>代碼示例>>Java>>正文


Java MaterialDialog.show方法代碼示例

本文整理匯總了Java中com.afollestad.materialdialogs.MaterialDialog.show方法的典型用法代碼示例。如果您正苦於以下問題:Java MaterialDialog.show方法的具體用法?Java MaterialDialog.show怎麽用?Java MaterialDialog.show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.afollestad.materialdialogs.MaterialDialog的用法示例。


在下文中一共展示了MaterialDialog.show方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: showFirstRunDialog

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
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();
}
 
開發者ID:theblixguy,項目名稱:ScanLinks,代碼行數:18,代碼來源:MainActivity.java

示例2: show500ServerError

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@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);
}
 
開發者ID:narenkukreja,項目名稱:quire,代碼行數:20,代碼來源:WelcomeActivity.java

示例3: showNoInternetConnectionError

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@Override
public void showNoInternetConnectionError() {

    builder = new MaterialDialog.Builder(mContext)
            .title(R.string.all_dialog_connection_error_title)
            .content(R.string.all_dialog_connection_error_content)
            .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);
}
 
開發者ID:narenkukreja,項目名稱:quire,代碼行數:18,代碼來源:WelcomeActivity.java

示例4: showSuccessDialog

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@Override
public void showSuccessDialog() {
    builder = new MaterialDialog.Builder(mContext)
            .title("Success")
            .content("Your listing has been updated!")
            .positiveText("Continue").onPositive(new MaterialDialog.SingleButtonCallback() {
                @Override
                public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {

                    dialog.dismiss();
                    startActivity(new Intent(mContext, NearbyProductsActivity.class));
                    overridePendingTransition(R.anim.left_out, R.anim.right_in);

                }
            });

    dialog = builder.build();
    dialog.show();
    dialog.setCanceledOnTouchOutside(false);
}
 
開發者ID:narenkukreja,項目名稱:quire,代碼行數:21,代碼來源:UpdateUserListingActivity.java

示例5: showTimeOutError

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@Override
public void showTimeOutError() {
    builder = new MaterialDialog.Builder(mContext)
            .title("Timeout Error")
            .content("Please check your internet connection and try again.")
            .positiveText("Aceptar").onPositive(new MaterialDialog.SingleButtonCallback() {
                @Override
                public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {

                    dialog.dismiss();

                }
            });

    dialog = builder.build();
    dialog.show();
    dialog.setCanceledOnTouchOutside(false);
}
 
開發者ID:narenkukreja,項目名稱:quire,代碼行數:19,代碼來源:UpdateUserListingActivity.java

示例6: showSuccessDialog

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@Override
public void showSuccessDialog() {
    builder = new MaterialDialog.Builder(mContext)
            .title(R.string.view_single_dialog_title_success)
            .content(R.string.nearby_dialog_listing_created)
            .positiveText(R.string.view_single_dialog_positive_continue).onPositive(new MaterialDialog.SingleButtonCallback() {
                @Override
                public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {

                    dialog.dismiss();
                    startActivity(new Intent(mContext, NearbyProductsActivity.class));
                    overridePendingTransition(R.anim.left_out, R.anim.right_in);

                }
            });

    dialog = builder.build();
    dialog.show();
    dialog.setCanceledOnTouchOutside(false);
}
 
開發者ID:narenkukreja,項目名稱:quire,代碼行數:21,代碼來源:ListNewItemActivity.java

示例7: showRequiredImagesDialog

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@Override
public void showRequiredImagesDialog() {
    builder = new MaterialDialog.Builder(mContext)
            .title(R.string.new_item_dialog_title_missing_image)
            .content(R.string.new_item_dialog_content_missing_image)
            .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);
}
 
開發者ID:narenkukreja,項目名稱:quire,代碼行數:19,代碼來源:ListNewItemActivity.java

示例8: showTimeOutError

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@Override
public void showTimeOutError() {
    builder = new MaterialDialog.Builder(mContext)
            .title(R.string.all_dialog_timeout_error_title)
            .content(R.string.all_dialog_timeout_error_content)
            .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);
}
 
開發者ID:narenkukreja,項目名稱:quire,代碼行數:17,代碼來源:ListNewItemActivity.java

示例9: showNetworkError

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@Override
public void showNetworkError() {
    builder = new MaterialDialog.Builder(mContext)
            .title(R.string.all_dialog_network_error_title)
            .content(R.string.all_dialog_timeout_error_content)
            .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);
}
 
開發者ID:narenkukreja,項目名稱:quire,代碼行數:19,代碼來源:ListNewItemActivity.java

示例10: showDialog

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@Override protected void showDialog(Bundle state) {
    MaterialDialog.Builder builder = new MaterialDialog.Builder(context)
            .title(getDialogTitle())
            .icon(getDialogIcon())
            .dismissListener(this)
            .onAny(new MaterialDialog.SingleButtonCallback() {
                @Override
                public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
                    switch (which) {
                        default:
                            MaterialDialogPreference.this.onClick(dialog, DialogInterface.BUTTON_POSITIVE);
                            break;
                        case NEUTRAL:
                            MaterialDialogPreference.this.onClick(dialog, DialogInterface.BUTTON_NEUTRAL);
                            break;
                        case NEGATIVE:
                            MaterialDialogPreference.this.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);
                            break;
                    }
                }
            })
            .positiveText(getPositiveButtonText())
            .negativeText(getNegativeButtonText())
            .autoDismiss(true); // immediately close the dialog after selection

    final View contentView = onCreateDialogView();
    if (contentView != null) {
        onBindDialogView(contentView);
        builder.customView(contentView, false);
    } else {
        builder.content(getDialogMessage());
    }

    PrefUtil.registerOnActivityDestroyListener(this, this);

    dialog = builder.build();
    if (state != null)
        dialog.onRestoreInstanceState(state);
    dialog.show();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:41,代碼來源:MaterialDialogPreference.java

示例11: onCreateDialog

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
    builder.typeface(TypefaceHelper.getMedium(getActivity()), TypefaceHelper.getRegular(getActivity()));
    builder.customView(R.layout.fragment_filter, false);
    MaterialDialog dialog = builder.build();
    dialog.show();

    ButterKnife.bind(this, dialog);
    mTitle.setText(mIsMuzei ? R.string.muzei_category : R.string.wallpaper_filter);
    mMenuSelect.setOnClickListener(this);
    return dialog;
}
 
開發者ID:danimahardhika,項目名稱:wallpaperboard,代碼行數:15,代碼來源:FilterFragment.java

示例12: onCreateDialog

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
    builder.customView(R.layout.fragment_licenses, false);
    builder.typeface(TypefaceHelper.getMedium(getActivity()), TypefaceHelper.getRegular(getActivity()));
    builder.title(R.string.about_open_source_licenses);
    MaterialDialog dialog = builder.build();
    dialog.show();

    ButterKnife.bind(this, dialog);
    return dialog;
}
 
開發者ID:danimahardhika,項目名稱:wallpaperboard,代碼行數:14,代碼來源:LicensesFragment.java

示例13: onCreateDialog

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
    builder.customView(R.layout.fragment_languages, false);
    builder.typeface(TypefaceHelper.getMedium(getActivity()), TypefaceHelper.getRegular(getActivity()));
    builder.title(R.string.pref_language_header);
    MaterialDialog dialog = builder.build();
    dialog.show();

    ButterKnife.bind(this, dialog);
    return dialog;
}
 
開發者ID:danimahardhika,項目名稱:wallpaperboard,代碼行數:14,代碼來源:LanguagesFragment.java

示例14: onCreateDialog

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
    builder.customView(R.layout.fragment_refresh_duration, true);
    builder.typeface(TypefaceHelper.getMedium(getActivity()), TypefaceHelper.getRegular(getActivity()));
    builder.title(R.string.muzei_refresh_duration);
    builder.positiveText(R.string.close);

    MaterialDialog dialog = builder.build();
    dialog.show();

    ButterKnife.bind(this, dialog);
    return dialog;
}
 
開發者ID:danimahardhika,項目名稱:wallpaperboard,代碼行數:16,代碼來源:RefreshDurationFragment.java

示例15: onCreateDialog

import com.afollestad.materialdialogs.MaterialDialog; //導入方法依賴的package包/類
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    MaterialDialog.Builder builder = new MaterialDialog.Builder(getActivity());
    builder.customView(R.layout.fragment_credits, false);
    builder.typeface(TypefaceHelper.getMedium(getActivity()), TypefaceHelper.getRegular(getActivity()));
    builder.title(getTitle(mType));
    builder.positiveText(R.string.close);

    MaterialDialog dialog = builder.build();
    dialog.show();
    ButterKnife.bind(this, dialog);
    return dialog;
}
 
開發者ID:danimahardhika,項目名稱:wallpaperboard,代碼行數:15,代碼來源:CreditsFragment.java


注:本文中的com.afollestad.materialdialogs.MaterialDialog.show方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。