Ejemplo n.º 1
0
        void EditText_FocusChange(object sender, FocusChangeEventArgs e)
        {
            var mgr = (InputMethodManager)Context.GetSystemService(Context.InputMethodService);

            if (TextViewError.Visibility == ViewStates.Invisible)
            {
                if (e.HasFocus)
                {
                    DividerLine.SetBackgroundColor(new Color(DividerColorFocus.ToArgb()));
                }
                else
                {
                    DividerLine.SetBackgroundColor(new Color(DividerColor.ToArgb()));
                }
            }

            if (e.HasFocus)
            {
                mgr.ShowSoftInput(EditTextControl, ShowFlags.Implicit);
                UpdateLabelSize(e.HasFocus);
            }
            else
            {
                Validate();
            }
        }
Ejemplo n.º 2
0
        View CreateDivider()
        {
            DividerLine = new View(Context);

            var lpDivider = new LinearLayout.LayoutParams(LayoutParams.MatchParent, (int)TypedValue.ApplyDimension(ComplexUnitType.Dip, 2, Resources.DisplayMetrics));

            DividerLine.LayoutParameters = lpDivider;
            DividerLine.SetBackgroundColor(new Color(DividerColor.ToArgb()));

            return(DividerLine);
        }