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);
}
});
}
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);
}
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;
}
}
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;
}
}
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;
}
}
Aggregations