Example #1
0
        EditText CreateEditText()
        {
            EditTextControl = new TextInputEditText(Context);
            var lpEditText = new LinearLayout.LayoutParams(LayoutParams.MatchParent, LayoutParams.MatchParent);

            EditTextControl.LayoutParameters = lpEditText;
            EditTextControl.Hint             = TextHint;
            EditTextControl.Text             = Text;
            EditTextControl.ImeOptions       = ImeOptions;
            EditTextControl.SetTextColor(ContextCompat.GetColorStateList(Context, Resource.Color.deep_lemon));
            EditTextControl.SetHintTextColor(ContextCompat.GetColorStateList(Context, Resource.Color.deep_lemon));
            EditTextControl.Background   = null;
            EditTextControl.InputType    = InputType;
            EditTextControl.ImeOptions   = ImeAction.Done;
            EditTextControl.FocusChange += EditText_FocusChange;
            EditTextControl.TextChanged += EditText_TextChanged;

            UpdateLabelSize(Text?.Length > 0);

            return(EditTextControl);
        }