Skip to content

Instantly share code, notes, and snippets.

@cjlotz
Last active May 1, 2017 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjlotz/9a9c6668a608172a372ac892159c59a6 to your computer and use it in GitHub Desktop.
Save cjlotz/9a9c6668a608172a372ac892159c59a6 to your computer and use it in GitHub Desktop.
Constructors
[Register("intouch.controls.ITTextInputLayout")]
public class ITTextInputLayout : TextInputLayout, IITComposite
{
public ITTextInputLayout(Context context) : this(context, null)
{
}
public ITTextInputLayout(Context context, IAttributeSet attrs) : base(context, attrs)
{
LayoutInflater inflator = (LayoutInflater)context.GetSystemService(Context.LayoutInflaterService);
inflator.Inflate(Resource.Layout.control_textinput, this);
Control = (TextInputEditText) EditText;
TypedArray a = context.ObtainStyledAttributes(attrs, Resource.Styleable.ITTextInputLayout);
try
{
InputType = (InputTypes)a.GetInt(Resource.Styleable.ITTextInputLayout_android_inputType, (int)InputTypes.ClassText);
ImeOptions = (ImeAction)a.GetInt(Resource.Styleable.ITTextInputLayout_android_imeOptions, (int)ImeAction.None);
MaxLines = a.GetInt(Resource.Styleable.ITTextInputLayout_android_maxLines, 1);
Text = a.GetString(Resource.Styleable.ITTextInputLayout_android_text);
Header = a.GetString(Resource.Styleable.ITTextInputLayout_ItcHeader);
Error = a.GetString(Resource.Styleable.ITTextInputLayout_ItcError);
}
finally
{
a.Recycle();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment