Example #1
0
        public OrderAirport(Context context, IAttributeSet attrs) : base(LayoutHelper.GetLayoutForView(Resource.Layout.SubView_OrderAirport, context), context, attrs)
        {
            this.DelayBind(() =>
            {
                _txtPUPoints  = Content.FindViewById <EditTextSpinner>(Resource.Id.txtPUPoints);
                _txtAirlines  = Content.FindViewById <EditTextSpinner>(Resource.Id.txtAirlines);
                _txtFlightNum = Content.FindViewById <EditText>(Resource.Id.txtFlightNum);
                _txtEditNote  = FindViewById <EditTextEntry>(Resource.Id.txtAirportNotes);
                _txtDateTime  = Content.FindViewById <Button>(Resource.Id.txtDateTime);

                _txtEditNote.SetClickAnywhereToDismiss();

                // hack for scroll in view when in EditText
                _bottomPadding = Content.FindViewById <LinearLayout>(Resource.Id.HackBottomPadding);
                TextFieldInHomeSubviewsBehavior.ApplyTo(
                    new List <EditText>()
                {
                    _txtEditNote, _txtFlightNum
                },
                    () => _bottomPadding.Visibility = ViewStates.Visible,
                    () => _bottomPadding.Visibility = ViewStates.Gone
                    );
                var hintTextColor = Resources.GetColor(Resource.Color.drivernode_hint_color);

                _txtEditNote.SetHintTextColor(hintTextColor);
                _txtDateTime.SetHintTextColor(hintTextColor);

                InitializeBinding();
            });
        }
Example #2
0
        public OrderEdit(Context context, IAttributeSet attrs) : base(LayoutHelper.GetLayoutForView(Resource.Layout.SubView_OrderEdit, context), context, attrs)
        {
            this.DelayBind(() =>
            {
                _lblName       = Content.FindViewById <TextView>(Resource.Id.lblName);
                _txtDialCode   = Content.FindViewById <MvxSpinner>(Resource.Id.lblDialCode);
                _lblPhone      = Content.FindViewById <TextView>(Resource.Id.lblPhone);
                _lblPassengers = Content.FindViewById <TextView>(Resource.Id.lblPassengers);
                _lblApartment  = Content.FindViewById <TextView>(Resource.Id.lblApartment);
                _lblEntryCode  = Content.FindViewById <TextView>(Resource.Id.lblEntryCode);
                _txtName       = Content.FindViewById <EditText>(Resource.Id.txtName);
                _txtPhone      = Content.FindViewById <EditText>(Resource.Id.txtPhone);
                _txtPassengers = Content.FindViewById <EditText>(Resource.Id.txtPassengers);
                _txtApartment  = Content.FindViewById <EditText>(Resource.Id.txtApartment);
                _txtEntryCode  = Content.FindViewById <EditText>(Resource.Id.txtEntryCode);
                _txtChargeType = Content.FindViewById <EditTextSpinner>(Resource.Id.txtChargeType);

                // hack for scroll in view when in EditText
                _bottomPadding = Content.FindViewById <LinearLayout>(Resource.Id.HackBottomPadding);
                TextFieldInHomeSubviewsBehavior.ApplyTo(
                    new List <EditText> {
                    _txtName, _txtPhone, _txtPassengers, _txtApartment, _txtEntryCode
                },
                    () => _bottomPadding.Visibility = ViewStates.Visible,
                    () => _bottomPadding.Visibility = ViewStates.Gone
                    );

                InitializeBinding();
            });
        }
Example #3
0
        public OrderReview(Context context, IAttributeSet attrs) : base(LayoutHelper.GetLayoutForView(Resource.Layout.SubView_OrderReview, context), context, attrs)
        {
            this.DelayBind(() =>
            {
                _lblName         = Content.FindViewById <TextView>(Resource.Id.lblName);
                _lblDialCode     = Content.FindViewById <TextView>(Resource.Id.lblDialCode);
                _lblPhone        = Content.FindViewById <TextView>(Resource.Id.lblPhone);
                _lblNbPassengers = Content.FindViewById <TextView>(Resource.Id.lblNbPassengers);
                _lblDate         = Content.FindViewById <TextView>(Resource.Id.lblDate);
                _lblVehicule     = Content.FindViewById <TextView>(Resource.Id.lblVehicule);
                _lblChargeType   = Content.FindViewById <TextView>(Resource.Id.lblChargeType);
                _lblApt          = Content.FindViewById <TextView>(Resource.Id.lblApt);
                _lblRingCode     = Content.FindViewById <TextView>(Resource.Id.lblRingCode);
                _lblBonusAmount  = FindViewById <TextView>(Resource.Id.lblBonusAmount);
                _editNote        = FindViewById <EditTextEntry>(Resource.Id.txtNotes);
                _editPromoCode   = FindViewById <EditTextEntry>(Resource.Id.txtPromoCode);
                _btnPromo        = FindViewById <Button>(Resource.Id.btnPromo);
                _sliderBonus     = FindViewById <SeekBar>(Resource.Id.sliderBonus);
                _switchBonus     = FindViewById <Switch>(Resource.Id.switchBonus);
                _driverBonusView = FindViewById <RelativeLayout>(Resource.Id.driverBonusView);

                _editNote.SetClickAnywhereToDismiss();

                _switchBonus.CheckedChange += (sender, e) =>
                {
                    if (_switchBonus.Checked)
                    {
                        _lblBonusAmount.SetTextColor(Color.Black);
                    }
                    else
                    {
                        _lblBonusAmount.SetTextColor(Color.Rgb(208, 208, 208));
                    }
                };

                // hack for scroll in view when in EditText
                _bottomPadding = Content.FindViewById <LinearLayout>(Resource.Id.HackBottomPadding);
                TextFieldInHomeSubviewsBehavior.ApplyTo(
                    new List <EditText>()
                {
                    _editNote, _editPromoCode
                },
                    () => _bottomPadding.Visibility = ViewStates.Visible,
                    () => _bottomPadding.Visibility = ViewStates.Gone);

                var hintTextColor = Resources.GetColor(Resource.Color.drivernode_hint_color);

                _editNote.SetHintTextColor(hintTextColor);
                InitializeBinding();
            });
        }