use of com.vondear.rxtools.view.dialog.RxDialogLoading 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;
}
}
Aggregations