/// <summary> /// Initializes a new instance of the <see cref="T:AiForms.Renderers.Droid.EntryCellView"/> class. /// </summary> /// <param name="context">Context.</param> /// <param name="cell">Cell.</param> public PasswordEntryCellView(Context context, Cell cell) : base(context, cell) { _EditText = new AiEditText(context); _EditText.Focusable = true; _EditText.ImeOptions = ImeAction.Done; _EditText.SetOnEditorActionListener(this); _EditText.OnFocusChangeListener = this; _EditText.Ellipsize = TextUtils.TruncateAt.End; _EditText.InputType |= InputTypes.TextFlagNoSuggestions; //disabled spell check _EditText.Background.Alpha = 0; //hide underline _EditText.ClearFocusAction = DoneEdit; Click += EntryCellView_Click; //remove weight and change width due to fill _EditText. var titleParam = TitleLabel.LayoutParameters as LinearLayout.LayoutParams; titleParam.Weight = 0; titleParam.Width = ViewGroup.LayoutParams.WrapContent; titleParam = null; var lparams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WrapContent, 1f); using (lparams) { ContentStack.AddView(_EditText, lparams); } }
/// <summary> /// Dispose the specified disposing. /// </summary> /// <returns>The dispose.</returns> /// <param name="disposing">If set to <c>true</c> disposing.</param> protected override void Dispose(bool disposing) { if (disposing) { Click -= EntryCellView_Click; _EditText.RemoveFromParent(); _EditText.SetOnEditorActionListener(null); _EditText.RemoveTextChangedListener(this); _EditText.OnFocusChangeListener = null; _EditText.ClearFocusAction = null; _EditText.Dispose(); _EditText = null; } base.Dispose(disposing); }