本文整理汇总了Java中com.afollestad.materialdialogs.MaterialDialog.setCanceledOnTouchOutside方法的典型用法代码示例。如果您正苦于以下问题:Java MaterialDialog.setCanceledOnTouchOutside方法的具体用法?Java MaterialDialog.setCanceledOnTouchOutside怎么用?Java MaterialDialog.setCanceledOnTouchOutside使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.afollestad.materialdialogs.MaterialDialog
的用法示例。
在下文中一共展示了MaterialDialog.setCanceledOnTouchOutside方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: 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);
}
示例3: 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.view_single_dialog_content_success)
.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);
}
示例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);
}
示例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);
}
示例6: 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);
}
示例7: 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_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);
}
示例8: 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);
}
示例9: 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);
}
示例10: 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);
}
示例11: 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);
}
示例12: 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);
}
示例13: startRecordingWithProgressDialog
import com.afollestad.materialdialogs.MaterialDialog; //导入方法依赖的package包/类
public static void startRecordingWithProgressDialog(final String filename,
final String filterQuery, final String logLevel, final Runnable onPostExecute, final Context context) {
final MaterialDialog progressDialog = new MaterialDialog.Builder(context)
.title(R.string.dialog_please_wait)
.content(R.string.dialog_initializing_recorder)
.progress(true, -1)
.build();
progressDialog.setCancelable(false);
progressDialog.setCanceledOnTouchOutside(false);
final Handler handler = new Handler(Looper.getMainLooper());
progressDialog.show();
new Thread(new Runnable() {
@Override
public void run() {
ServiceHelper.startBackgroundServiceIfNotAlreadyRunning(context, filename, filterQuery, logLevel);
handler.post(new Runnable() {
@Override
public void run() {
if (progressDialog.isShowing()) {
progressDialog.dismiss();
}
if (onPostExecute != null) {
onPostExecute.run();
}
}
});
}
}).start();
}