use of com.vondear.rxtools.view.dialog.RxDialogSureCancel in project RxTools by vondear.
the class ActivityDialog method onClick.
@OnClick({ R.id.button_DialogScaleView, R.id.button_DialogLoadingspinkit, R.id.button_tran, R.id.button_DialogSure, R.id.button_DialogSureCancle, R.id.button_DialogEditTextSureCancle, R.id.button_DialogWheelYearMonthDay, R.id.button_DialogShapeLoading, R.id.button_DialogLoadingProgressAcfunVideo })
public void onClick(View view) {
switch(view.getId()) {
case R.id.button_tran:
RxDialog rxDialog = new RxDialog(mContext, R.style.tran_dialog);
View view1 = LayoutInflater.from(mContext).inflate(R.layout.image, null);
ImageView pageItem = (ImageView) view1.findViewById(R.id.page_item);
pageItem.setImageResource(R.drawable.coin);
rxDialog.setContentView(view1);
rxDialog.show();
break;
case R.id.button_DialogSure:
// 提示弹窗
final RxDialogSure rxDialogSure = new RxDialogSure(mContext);
rxDialogSure.getLogoView().setImageResource(R.drawable.logo);
rxDialogSure.getSureView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
rxDialogSure.cancel();
}
});
rxDialogSure.show();
break;
case R.id.button_DialogSureCancle:
// 提示弹窗
final RxDialogSureCancel rxDialogSureCancel = new RxDialogSureCancel(mContext);
rxDialogSureCancel.getTitleView().setBackgroundResource(R.drawable.logo);
rxDialogSureCancel.getSureView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
rxDialogSureCancel.cancel();
}
});
rxDialogSureCancel.getCancelView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
rxDialogSureCancel.cancel();
}
});
rxDialogSureCancel.show();
break;
case R.id.button_DialogEditTextSureCancle:
// 提示弹窗
final RxDialogEditSureCancel rxDialogEditSureCancel = new RxDialogEditSureCancel(mContext);
rxDialogEditSureCancel.getTitleView().setBackgroundResource(R.drawable.logo);
rxDialogEditSureCancel.getSureView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
rxDialogEditSureCancel.cancel();
}
});
rxDialogEditSureCancel.getCancelView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
rxDialogEditSureCancel.cancel();
}
});
rxDialogEditSureCancel.show();
break;
case R.id.button_DialogWheelYearMonthDay:
if (mRxDialogWheelYearMonthDay == null) {
initWheelYearMonthDayDialog();
}
mRxDialogWheelYearMonthDay.show();
break;
case R.id.button_DialogShapeLoading:
RxDialogShapeLoading rxDialogShapeLoading = new RxDialogShapeLoading(this);
rxDialogShapeLoading.show();
break;
case R.id.button_DialogLoadingProgressAcfunVideo:
new RxDialogAcfunVideoLoading(this).show();
break;
case R.id.button_DialogLoadingspinkit:
RxDialogLoading rxDialogLoading = new RxDialogLoading(mContext);
rxDialogLoading.show();
// rxDialogLoading.cancel(RxDialogLoading.RxCancelType.error,"");
break;
case R.id.button_DialogScaleView:
RxDialogScaleView rxDialogScaleView = new RxDialogScaleView(mContext);
rxDialogScaleView.setImageAssets("squirrel.jpg");
rxDialogScaleView.show();
break;
default:
break;
}
}
use of com.vondear.rxtools.view.dialog.RxDialogSureCancel in project RxTools by vondear.
the class ActivitySplash method ShowDialog.
private void ShowDialog(String strAppVersionName, String apk_down_url) {
// 提示弹窗
final RxDialogSureCancel rxDialogSureCancel = new RxDialogSureCancel(context);
rxDialogSureCancel.getContentView().setText(strAppVersionName);
rxDialogSureCancel.getSureView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// getFile(apk_down_url, RxFileTool.getDiskFileDir(context) + File.separator + "update", str + ".apk");
// TODO: 第一步 在此处 使用 你的网络框架下载 新的Apk文件 可参照下面的例子 使用的是 okGo网络框架
// TODO: 第二步 可使用 RxAppTool.InstallAPK(context,file.getAbsolutePath()); 方法进行 最新版本Apk文件的安装
rxDialogSureCancel.cancel();
}
});
rxDialogSureCancel.getCancelView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RxToast.showToast(context, "已取消最新版本的下载", 500);
rxDialogSureCancel.cancel();
}
});
rxDialogSureCancel.show();
}
use of com.vondear.rxtools.view.dialog.RxDialogSureCancel in project RxTools by vondear.
the class ActivityRxPhoto method onClick.
@OnClick(R.id.btn_exit)
public void onClick() {
final RxDialogSureCancel rxDialogSureCancel = new RxDialogSureCancel(this);
rxDialogSureCancel.getCancelView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
rxDialogSureCancel.cancel();
}
});
rxDialogSureCancel.getSureView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
rxDialogSureCancel.show();
}
Aggregations