Search in sources :

Example 36 with OnClick

use of butterknife.OnClick in project curb by irijwj.

the class InformationCreateFragment method onM_AddInfoEditTimeClicked.

@OnClick(R.id.add_info_edit_time)
public void onM_AddInfoEditTimeClicked() {
    TimePicker lc_timePicker = new TimePicker(m_activity);
    lc_timePicker.setElevation(3);
    ConstraintLayout.LayoutParams lc_layoutParams = new ConstraintLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    m_InfoDetailConstraintLayout.addView(lc_timePicker, lc_layoutParams);
    lc_timePicker.setVisibility(View.VISIBLE);
    lc_timePicker.setOnTimeChangedListener(new TimePicker.OnTimeChangedListener() {

        @Override
        public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
            setTime(hourOfDay, minute);
        }
    });
}
Also used : TimePicker(android.widget.TimePicker) ConstraintLayout(android.support.constraint.ConstraintLayout) OnClick(butterknife.OnClick)

Example 37 with OnClick

use of butterknife.OnClick in project curb by irijwj.

the class SmallDataFragment method onM_SdContentImagebuttonResultClicked.

@OnClick(R.id.sd_content_imagebutton_result)
public void onM_SdContentImagebuttonResultClicked() {
    Intent lc_intent = new Intent(presenter.getContextInPresenter(), ResultActivity.class);
    lc_intent.putExtra("summary_id", m_sdSummaries.get(indexForSummary).getId());
    startActivity(lc_intent);
}
Also used : Intent(android.content.Intent) OnClick(butterknife.OnClick)

Example 38 with OnClick

use of butterknife.OnClick 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)

Example 39 with OnClick

use of butterknife.OnClick in project RxTools by vondear.

the class ActivityPopupView method onClick.

@OnClick({ R.id.tv_imply, R.id.tv_definition, R.id.button_above, R.id.button_below, R.id.button_left_to, R.id.button_right_to, R.id.button_align_center, R.id.button_align_left, R.id.button_align_right })
public void onClick(View view) {
    String text = TextUtils.isEmpty(mTextInputEditText.getText()) ? TIP_TEXT : mTextInputEditText.getText().toString();
    RxPopupView.Builder builder;
    View tipvView;
    switch(view.getId()) {
        case R.id.tv_imply:
            if (popupImply == null) {
                popupImply = new RxPopupImply(mContext);
            }
            popupImply.show(mTvImply);
            break;
        case R.id.tv_definition:
            initPopupView();
            titlePopup.show(mTvDefinition, 0);
            break;
        case R.id.button_above:
            mRxPopupViewManager.findAndDismiss(mTextView);
            builder = new RxPopupView.Builder(this, mTextView, mParentLayout, text, RxPopupView.POSITION_ABOVE);
            builder.setAlign(mAlign);
            tipvView = mRxPopupViewManager.show(builder.build());
            break;
        case R.id.button_below:
            mRxPopupViewManager.findAndDismiss(mTextView);
            builder = new RxPopupView.Builder(this, mTextView, mParentLayout, text, RxPopupView.POSITION_BELOW);
            builder.setAlign(mAlign);
            builder.setBackgroundColor(getResources().getColor(R.color.orange));
            tipvView = mRxPopupViewManager.show(builder.build());
            break;
        case R.id.button_left_to:
            mRxPopupViewManager.findAndDismiss(mTextView);
            builder = new RxPopupView.Builder(this, mTextView, mParentLayout, text, RxPopupView.POSITION_LEFT_TO);
            builder.setBackgroundColor(getResources().getColor(R.color.greenyellow));
            builder.setTextColor(getResources().getColor(R.color.black));
            builder.setGravity(RxPopupView.GRAVITY_CENTER);
            builder.setTextSize(12);
            tipvView = mRxPopupViewManager.show(builder.build());
            break;
        case R.id.button_right_to:
            mRxPopupViewManager.findAndDismiss(mTextView);
            builder = new RxPopupView.Builder(this, mTextView, mParentLayout, text, RxPopupView.POSITION_RIGHT_TO);
            builder.setBackgroundColor(getResources().getColor(R.color.paleturquoise));
            builder.setTextColor(getResources().getColor(android.R.color.black));
            tipvView = mRxPopupViewManager.show(builder.build());
            break;
        case R.id.button_align_center:
            mAlign = RxPopupView.ALIGN_CENTER;
            break;
        case R.id.button_align_left:
            mAlign = RxPopupView.ALIGN_LEFT;
            break;
        case R.id.button_align_right:
            mAlign = RxPopupView.ALIGN_RIGHT;
            break;
    }
}
Also used : RxPopupView(com.vondear.rxtools.view.popupwindows.tools.RxPopupView) RxPopupView(com.vondear.rxtools.view.popupwindows.tools.RxPopupView) BindView(butterknife.BindView) View(android.view.View) TextView(android.widget.TextView) RxPopupSingleView(com.vondear.rxtools.view.popupwindows.RxPopupSingleView) RxPopupImply(com.vondear.rxtools.view.popupwindows.RxPopupImply) OnClick(butterknife.OnClick)

Example 40 with OnClick

use of butterknife.OnClick in project RxTools by vondear.

the class ActivityRxToast method onClick.

@OnClick({ R.id.button_error_toast, R.id.button_success_toast, R.id.button_info_toast, R.id.button_warning_toast, R.id.button_normal_toast_wo_icon, R.id.button_normal_toast_w_icon })
public void onClick(View view) {
    switch(view.getId()) {
        case R.id.button_error_toast:
            RxToast.error(mContext, "这是一个提示错误的Toast!", Toast.LENGTH_SHORT, true).show();
            break;
        case R.id.button_success_toast:
            RxToast.success(mContext, "这是一个提示成功的Toast!", Toast.LENGTH_SHORT, true).show();
            break;
        case R.id.button_info_toast:
            RxToast.info(mContext, "这是一个提示信息的Toast.", Toast.LENGTH_SHORT, true).show();
            break;
        case R.id.button_warning_toast:
            RxToast.warning(mContext, "这是一个提示警告的Toast.", Toast.LENGTH_SHORT, true).show();
            break;
        case R.id.button_normal_toast_wo_icon:
            RxToast.normal(mContext, "这是一个普通的没有ICON的Toast").show();
            break;
        case R.id.button_normal_toast_w_icon:
            Drawable icon = getResources().getDrawable(R.drawable.set);
            RxToast.normal(mContext, "这是一个普通的包含ICON的Toast", icon).show();
            break;
    }
}
Also used : Drawable(android.graphics.drawable.Drawable) OnClick(butterknife.OnClick)

Aggregations

OnClick (butterknife.OnClick)465 Intent (android.content.Intent)206 View (android.view.View)24 AlertDialog (android.support.v7.app.AlertDialog)21 TextView (android.widget.TextView)18 File (java.io.File)18 Bundle (android.os.Bundle)16 BindView (butterknife.BindView)16 DialogInterface (android.content.DialogInterface)15 ArrayList (java.util.ArrayList)15 DialogFragment (com.rey.material.app.DialogFragment)13 SimpleDialog (com.rey.material.app.SimpleDialog)13 Uri (android.net.Uri)11 SimpleDateFormat (java.text.SimpleDateFormat)11 SuppressLint (android.annotation.SuppressLint)10 ImageView (android.widget.ImageView)10 LzyResponse (com.lzy.demo.model.LzyResponse)10 HorizontalChangeHandler (com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler)9 List (java.util.List)9 Animator (android.animation.Animator)8