コード例 #1
0
        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);
            }
        }
コード例 #2
0
        public BaseViewHolder <M> setOnClickListener(int viewId, View.IOnClickListener listener)
        {
            View view = getView(viewId);

            view.SetOnClickListener(listener);
            return(this);
        }
コード例 #3
0
 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();
 }
コード例 #4
0
        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);
            };
        }
コード例 #5
0
        public ViewHolder setOnClickListener(int viewId, View.IOnClickListener listener)
        {
            View view = GetView <View>(viewId);

            view.SetOnClickListener(listener);
            return(this);
        }
コード例 #6
0
 private void updateTheme()
 {
     if (mThemeListener == null)
     {
         mThemeListener = new ThemeOnClickListener(this);
     }
     mThemeListener.OnClick(null);
 }
コード例 #7
0
        public ViewHolder SetOnClickListener <T>(int viewId, T widget, View.IOnClickListener listener)
            where T : View
        {
            View view = GetView <T>(viewId);

            view.SetOnClickListener(listener);
            return(this);
        }
コード例 #8
0
 // 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;
 }
コード例 #9
0
 internal virtual void Set(Button button, string text, Typeface font, View.IOnClickListener listener)
 {
     Set(button, text, font);
     if (listener != null)
     {
         button.SetOnClickListener(listener);
     }
 }
コード例 #10
0
        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);
        }
コード例 #11
0
 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");
     }
 }
コード例 #13
0
        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);
        }
コード例 #14
0
        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;
        }
コード例 #15
0
        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);
        }
コード例 #16
0
 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);
     }
 }
コード例 #17
0
 public void setDefaultRequestBtnClickListener(View.IOnClickListener defaultRequestBtnClickListener)
 {
     this.defaultRequestBtnClickListener = defaultRequestBtnClickListener;
 }
コード例 #18
0
 public EasyRVHolder setOnItemViewClickListener(View.IOnClickListener listener)
 {
     mConvertView.SetOnClickListener(listener);
     return(this);
 }
コード例 #19
0
 public SliderAdapter(int[] content, int count, View.IOnClickListener listener)
 {
     this.content  = content;
     this.count    = count;
     this.listener = listener;
 }
コード例 #20
0
        /**
         * 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);
        }
コード例 #21
0
ファイル: AppMsg.cs プロジェクト: ClrsDream/AppMsg
 public static AppMsg MakeText(Activity context, String text, Style style, View.IOnClickListener clickListener)
 {
     return(MakeText(context, text, style, Resource.Layout.sino_appmsg_ui));
 }
コード例 #22
0
 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));
 }
コード例 #23
0
        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);
        }
コード例 #24
0
 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));
 }
コード例 #25
0
ファイル: Item.cs プロジェクト: wesleysfavarin/FoldingCell
 public void setRequestBtnClickListener(View.IOnClickListener requestBtnClickListener)
 {
     this.requestBtnClickListener = requestBtnClickListener;
 }
コード例 #26
0
 public override void SetOnClickListener(View.IOnClickListener l)
 {
     onClickListener = l;
 }
コード例 #27
0
 public virtual void AddCancelButton(string buttonCancelText, View.IOnClickListener onCancelButtonClickListener)
 {
     this.buttonCancelText            = buttonCancelText;
     this.onCancelButtonClickListener = onCancelButtonClickListener;
 }
コード例 #28
0
        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));
        }
コード例 #29
0
 public static AppMsg MakeText(Activity context, String text, Style style, View customeView, View.IOnClickListener clickListener)
 {
     return(MakeText(context, text, style, customeView, false, clickListener));
 }
コード例 #30
0
 public BaseViewHolder <M> setOnItemViewClickListener(View.IOnClickListener listener)
 {
     mConvertView.SetOnClickListener(listener);
     return(this);
 }