public void MsgBoxLogin(String login, String psw, View.IOnClickListener btn2lst) { invisible(); Dialog.SetTitle("Login/Password"); Edit1.SetText(login, TextView.BufferType.Normal); Edit2.SetText(psw, TextView.BufferType.Normal); Button1.SetText("CANCEL", TextView.BufferType.Normal); Button2.SetText("OK", TextView.BufferType.Normal); Text1.Visibility = ViewStates.Visible; Text1.SetText("Login", TextView.BufferType.Normal); Text2.Visibility = ViewStates.Visible; Text2.SetText("Password", TextView.BufferType.Normal); Button1.Visibility = ViewStates.Visible; Button2.Visibility = ViewStates.Visible; Edit1.Visibility = ViewStates.Visible; Edit2.Visibility = ViewStates.Visible; // btn1.SetOnClickListener (new View.IOnClickListener ());//{public void onClick(View v){dialog.cancel();}}); // btn2.SetOnClickListener(btn2lst); try { Dialog.Show(); } catch (Exception err) { Log.Debug("xxx", err.Message); } }
public BaseViewHolder <M> setOnClickListener(int viewId, View.IOnClickListener listener) { View view = getView(viewId); view.SetOnClickListener(listener); return(this); }
private void ShowSnackbar(int mainTextStringId, int actionStringId, View.IOnClickListener listener) { Snackbar.Make(FindViewById(Android.Resource.Id.Content), GetString(mainTextStringId), Snackbar.LengthIndefinite) .SetAction(GetString(actionStringId), listener).Show(); }
public SelectPicPopWindow(Activity _activity, View.IOnClickListener listener) { activity = _activity; LayoutInflater inflater = (LayoutInflater)activity.GetSystemService(Context.LayoutInflaterService); contentView = inflater.Inflate(Resource.Layout.headImgSelectorPop, null); ContentView = contentView; btn_take_photo = contentView.FindViewById <Button> (Resource.Id.btn_take_photo); btn_pick_photo = contentView.FindViewById <Button> (Resource.Id.btn_pick_photo); btn_cancel = contentView.FindViewById <Button> (Resource.Id.btn_pic_cancel); //设置宽度、高度 Width = Android.Views.ViewGroup.LayoutParams.MatchParent; Height = Android.Views.ViewGroup.LayoutParams.WrapContent; Focusable = true; OutsideTouchable = true; SetBackgroundDrawable(new ColorDrawable()); AnimationStyle = Resource.Style.Animationbottom; //设置按钮绑定 btn_take_photo.SetOnClickListener(listener); btn_pick_photo.SetOnClickListener(listener); //取消 btn_cancel.Click += (sender, e) => { Dismiss(); }; DismissEvent += (sender, e) => { BackgroundAlpha(1f); }; }
public ViewHolder setOnClickListener(int viewId, View.IOnClickListener listener) { View view = GetView <View>(viewId); view.SetOnClickListener(listener); return(this); }
private void updateTheme() { if (mThemeListener == null) { mThemeListener = new ThemeOnClickListener(this); } mThemeListener.OnClick(null); }
public ViewHolder SetOnClickListener <T>(int viewId, T widget, View.IOnClickListener listener) where T : View { View view = GetView <T>(viewId); view.SetOnClickListener(listener); return(this); }
// With action button public SnackBar(Activity activity, string text, string buttonText, View.IOnClickListener onClickListener) : base(activity, Android.Resource.Style.ThemeTranslucent) { this.activity = activity; this.text = text; this.buttonText = buttonText; this.onClickListener = onClickListener; }
internal virtual void Set(Button button, string text, Typeface font, View.IOnClickListener listener) { Set(button, text, font); if (listener != null) { button.SetOnClickListener(listener); } }
void SetupSettingsButton(int containerId, int labelId, int imageViewId, View.IOnClickListener onClickListener) { ViewGroup container = (ViewGroup)FindViewById(containerId); var buttonLabel = ((TextView)container.FindViewById(labelId)).Text; ImageView imageView = (ImageView)container.FindViewById(imageViewId); imageView.ContentDescription = buttonLabel; container.SetOnClickListener(onClickListener); }
internal static void SetOnClickListener(View.IOnClickListener listener, List <View>?clickViews, IEnumerable <View> views) { foreach (var view in views) { view.SetOnClickListener(listener); } if (clickViews == null) { clickViews = new(); } clickViews.AddRange(views); }
protected void SetBackClickListener(View.IOnClickListener l) { if (_back != null) { _back.Visibility = ViewStates.Visible; _back.SetOnClickListener(l); } else { Logger.T(Tag).E("back is null ,please check out"); } }
private void SetupSettingsButton( int containerId, int labelId, int imageViewId, View.IOnClickListener onClickListener ) { var container = FindViewById <ViewGroup>(containerId); var buttonLabel = container.FindViewById <TextView>(labelId); var buttonLabelText = buttonLabel.Text; var imageView = container.FindViewById <ImageView>(imageViewId); imageView.ContentDescription = buttonLabelText; container.SetOnClickListener(onClickListener); }
public ProductCatalogViewHolder(View itemView, View.IOnClickListener click) : base(itemView) { Promotion = itemView.FindViewById <TextView>(Resource.Id.promotion); Img = itemView.FindViewById <ImageView>(Resource.Id.img); Name = itemView.FindViewById <TextView>(Resource.Id.name); Discount = itemView.FindViewById <TextView>(Resource.Id.discount); Price = itemView.FindViewById <TextView>(Resource.Id.price); Add = itemView.FindViewById <Button>(Resource.Id.add); Remove = itemView.FindViewById <Button>(Resource.Id.remove); Quantity = itemView.FindViewById <TextView>(Resource.Id.quantity); Favorite = itemView.FindViewById <RatingBar>(Resource.Id.favorite); Add.SetOnClickListener(this); Remove.SetOnClickListener(this); Favorite.SetOnTouchListener(this); this.click = click; }
private void AppendButton(string shortcut, View.IOnClickListener l) { TextView shortcutButton = (TextView)LayoutInflater.Inflate(Resource.Layout.KeyboardShortcut, null); shortcutButton.Text = shortcut; shortcutButton.SetOnClickListener(l); String theme = PreferenceManager.GetDefaultSharedPreferences(this).GetString(GetString(Resource.String.pref_theme_key), EMPTY_STRING); if (theme.Equals(GetString(Resource.String.theme_dark))) { shortcutButton.SetTextColor(Resources.GetColor(Android.Resource.Color.White)); } else { shortcutButton.SetTextColor(Resources.GetColor(Android.Resource.Color.DarkerGray)); } keyboardBarView.AddView(shortcutButton); }
public void MsgBoxButtons(String title, String msg, View.IOnClickListener btn1lst, View.IOnClickListener btn2lst) { invisible(); Dialog.SetTitle(title); Button1.SetText("CANCEL", TextView.BufferType.Normal); Button2.SetText("OK", TextView.BufferType.Normal); Text1.Visibility = ViewStates.Visible; Button1.Visibility = ViewStates.Visible; Button2.Visibility = ViewStates.Visible; Button1.Visibility = ViewStates.Visible; Button2.Visibility = ViewStates.Visible; Text1.SetText(msg, TextView.BufferType.Normal); try { Dialog.Show(); } catch (Exception err) { Log.Debug("xxx", err.Message); } }
public void setDefaultRequestBtnClickListener(View.IOnClickListener defaultRequestBtnClickListener) { this.defaultRequestBtnClickListener = defaultRequestBtnClickListener; }
public EasyRVHolder setOnItemViewClickListener(View.IOnClickListener listener) { mConvertView.SetOnClickListener(listener); return(this); }
public SliderAdapter(int[] content, int count, View.IOnClickListener listener) { this.content = content; this.count = count; this.listener = listener; }
/** * Allows setting of an {@link OnClickListener} directly to a {@link Crouton} without having to use a custom view. * * @param OnClickListener * The {@link OnClickListener} to set. * * @return this {@link Crouton}. */ public Crouton SetOnClickListener(View.IOnClickListener onClickListener) { OnClickListener = onClickListener; return(this); }
public static AppMsg MakeText(Activity context, String text, Style style, View.IOnClickListener clickListener) { return(MakeText(context, text, style, Resource.Layout.sino_appmsg_ui)); }
public static AppMsg MakeText(Activity context, String text, Style style, float textSize, View.IOnClickListener clickListener) { return(MakeText(context, text, style, Resource.Layout.app_msg, textSize, clickListener)); }
private static AppMsg MakeText(Activity context, String text, Style style, View view, bool floating, float textSize, View.IOnClickListener clickListener) { AppMsg result = new AppMsg(context); view.SetBackgroundResource(style.Background); view.Clickable = true; TextView tv = view.FindViewById <TextView>(Android.Resource.Id.Message); if (textSize > 0) { tv.SetTextSize(Android.Util.ComplexUnitType.Sp, textSize); } tv.Text = text; result.mView = view; result.mDuration = style.Duration; result.mFloating = floating; view.SetOnClickListener(clickListener); return(result); }
public static AppMsg MakeText(Activity context, String text, Style style, View view, bool floating, View.IOnClickListener clickListener) { return(MakeText(context, text, style, view, floating, 0, clickListener)); }
public void setRequestBtnClickListener(View.IOnClickListener requestBtnClickListener) { this.requestBtnClickListener = requestBtnClickListener; }
public override void SetOnClickListener(View.IOnClickListener l) { onClickListener = l; }
public virtual void AddCancelButton(string buttonCancelText, View.IOnClickListener onCancelButtonClickListener) { this.buttonCancelText = buttonCancelText; this.onCancelButtonClickListener = onCancelButtonClickListener; }
public static AppMsg MakeText(Activity context, String text, Style style, int layoutId, float textSize, View.IOnClickListener clickListener) { LayoutInflater inflate = context.LayoutInflater; View v = inflate.Inflate(layoutId, null); return(MakeText(context, text, style, v, true, textSize, clickListener)); }
public static AppMsg MakeText(Activity context, String text, Style style, View customeView, View.IOnClickListener clickListener) { return(MakeText(context, text, style, customeView, false, clickListener)); }
public BaseViewHolder <M> setOnItemViewClickListener(View.IOnClickListener listener) { mConvertView.SetOnClickListener(listener); return(this); }