Search in sources :

Example 1 with RxDialogShapeLoading

use of com.vondear.rxtools.view.dialog.RxDialogShapeLoading 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;
    }
}
Also used : RxDialogEditSureCancel(com.vondear.rxtools.view.dialog.RxDialogEditSureCancel) RxDialog(com.vondear.rxtools.view.dialog.RxDialog) RxDialogLoading(com.vondear.rxtools.view.dialog.RxDialogLoading) RxDialogShapeLoading(com.vondear.rxtools.view.dialog.RxDialogShapeLoading) ImageView(android.widget.ImageView) RxDialogScaleView(com.vondear.rxtools.view.dialog.RxDialogScaleView) ImageView(android.widget.ImageView) BindView(butterknife.BindView) View(android.view.View) RxDialogScaleView(com.vondear.rxtools.view.dialog.RxDialogScaleView) RxDialogSure(com.vondear.rxtools.view.dialog.RxDialogSure) RxDialogSureCancel(com.vondear.rxtools.view.dialog.RxDialogSureCancel) RxDialogAcfunVideoLoading(com.vondear.rxtools.view.dialog.RxDialogAcfunVideoLoading) OnClick(butterknife.OnClick)

Aggregations

View (android.view.View)1 ImageView (android.widget.ImageView)1 BindView (butterknife.BindView)1 OnClick (butterknife.OnClick)1 RxDialog (com.vondear.rxtools.view.dialog.RxDialog)1 RxDialogAcfunVideoLoading (com.vondear.rxtools.view.dialog.RxDialogAcfunVideoLoading)1 RxDialogEditSureCancel (com.vondear.rxtools.view.dialog.RxDialogEditSureCancel)1 RxDialogLoading (com.vondear.rxtools.view.dialog.RxDialogLoading)1 RxDialogScaleView (com.vondear.rxtools.view.dialog.RxDialogScaleView)1 RxDialogShapeLoading (com.vondear.rxtools.view.dialog.RxDialogShapeLoading)1 RxDialogSure (com.vondear.rxtools.view.dialog.RxDialogSure)1 RxDialogSureCancel (com.vondear.rxtools.view.dialog.RxDialogSureCancel)1