/// <summary> /// Initializes a new instance of the <see cref="T:AiForms.Renderers.Droid.RadioCellView"/> class. /// </summary> /// <param name="context">Context.</param> /// <param name="cell">Cell.</param> public RadioCellView(Context context, XF.Cell cell) : base(context, cell) { _simpleCheck = new SimpleCheck(context); _simpleCheck.Focusable = false; var lparam = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent) { Width = (int)context.ToPixels(30), Height = (int)context.ToPixels(30) }; using (lparam) { AccessoryStack.AddView(_simpleCheck, lparam); } }
/// <summary> /// Initializes a new instance of the <see cref="T:AiForms.Renderers.Droid.CommandCellView"/> class. /// </summary> /// <param name="context">Context.</param> /// <param name="cell">Cell.</param> public CustomCellView(Context context, Cell cell) : base(context, cell) { if (!CustomCell.ShowArrowIndicator) { return; } _indicatorView = new ImageView(context); _indicatorView.SetImageResource(Resource.Drawable.ic_navigate_next); var param = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent) { }; using (param) { AccessoryStack.AddView(_indicatorView, param); } }
/// <summary> /// Initializes a new instance of the <see cref="T:AiForms.Renderers.Droid.SwitchCellView"/> class. /// </summary> /// <param name="context">Context.</param> /// <param name="cell">Cell.</param> public SwitchCellView(Context context, Cell cell) : base(context, cell) { _switch = new SwitchCompat(context); _switch.SetOnCheckedChangeListener(this); _switch.Gravity = Android.Views.GravityFlags.Right; var switchParam = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent) { }; using (switchParam) { AccessoryStack.AddView(_switch, switchParam); } _switch.Focusable = false; Focusable = false; DescendantFocusability = Android.Views.DescendantFocusability.AfterDescendants; }
/// <summary> /// Initializes a new instance of the <see cref="T:AiForms.Renderers.Droid.PickerCellView"/> class. /// </summary> /// <param name="context">Context.</param> /// <param name="cell">Cell.</param> public PickerCellView(Context context, Cell cell) : base(context, cell) { _context = context; if (!CellParent.ShowArrowIndicatorForAndroid) { return; } _indicatorView = new ImageView(context); _indicatorView.SetImageResource(global::AiForms.SettingsView.Resource.Drawable.ic_navigate_next); var param = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent) { }; using (param) { AccessoryStack.AddView(_indicatorView, param); } }
/// <summary> /// Initializes a new instance of the <see cref="T:AiForms.Renderers.Droid.CheckboxCellView"/> class. /// </summary> /// <param name="context">Context.</param> /// <param name="cell">Cell.</param> public CheckboxCellView(Context context, Cell cell) : base(context, cell) { _checkbox = new AppCompatCheckBox(context); _checkbox.SetOnCheckedChangeListener(this); _checkbox.Gravity = Android.Views.GravityFlags.Right; var lparam = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent) { Width = (int)context.ToPixels(30), Height = (int)context.ToPixels(30) }; using (lparam) { AccessoryStack.AddView(_checkbox, lparam); } _checkbox.Focusable = false; Focusable = false; DescendantFocusability = Android.Views.DescendantFocusability.AfterDescendants; }