/// <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 EntryCellView(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.SetSingleLine(true); _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> /// Initializes a new instance of the <see cref="T:AiForms.Renderers.Droid.LabelCellView"/> class. /// </summary> /// <param name="context">Context.</param> /// <param name="cell">Cell.</param> public LabelCellView(Context context, Cell cell) : base(context, cell) { ValueLabel = new TextView(context); ValueLabel.SetSingleLine(true); ValueLabel.Ellipsize = TextUtils.TruncateAt.End; ValueLabel.Gravity = GravityFlags.Right; var textParams = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent) { }; using (textParams) { ContentStack.AddView(ValueLabel, textParams); } }