public static LoadStringElementLayout ( Android.Content.Context context, Android.Views.View convertView, Android.Views.ViewGroup parent, int layoutId, Android.Widget.TextView &label, Android.Widget.TextView &value ) : Android.Views.View | ||
context | Android.Content.Context | |
convertView | Android.Views.View | |
parent | Android.Views.ViewGroup | |
layoutId | int | |
label | Android.Widget.TextView | |
value | Android.Widget.TextView | |
return | Android.Views.View |
public override View GetView(Context context, View convertView, ViewGroup parent) { View view = DroidResources.LoadStringElementLayout(context, convertView, parent, LayoutId, out _caption, out _text); if (view != null) { _caption.Text = Caption; if (FontSize != 0) { _caption.TextSize = FontSize; } _text.SetSingleLine(!Multiline); if (Multiline) { _text.SetLines(Lines); } _text.Text = Value; if (FontSize != 0) { _text.TextSize = FontSize; } if (Tapped != null) { view.Click += delegate { this.Tapped(); } } ; } return(view); }
public override View GetView(Context context, View convertView, ViewGroup parent) { View view = DroidResources.LoadStringElementLayout(context, convertView, parent, LayoutId, out _caption, out _text); if (view != null) { _caption.Text = Caption; _text.Text = Value; } return(view); }
public override View GetView(Context context, View convertView, ViewGroup parent) { View view = DroidResources.LoadStringElementLayout(context, convertView, parent, LayoutId, out _caption, out _text); if (view != null) { _caption.Text = Caption; _caption.TextSize = FontSize; _text.Text = Value; _text.TextSize = FontSize; if (Click != null) { view.Click += delegate { this.Click(); } } ; } return(view); }
public override View GetView(Context context, View convertView, ViewGroup parent) { View view = DroidResources.LoadStringElementLayout(context, convertView, parent, LayoutId, out _caption, out _text); if (view != null) { _caption.Text = Caption; _caption.TextSize = FontSize; _text.Text = Value; _text.TextSize = FontSize; _text.SetSingleLine(DetailTextSingleLine); if (String.IsNullOrEmpty(_caption.Text)) { _caption.Visibility = ViewStates.Gone; } if (Click != null) { view.Touch += delegate(object sender, View.TouchEventArgs e) { if (e.Event.Action == MotionEventActions.Up) { view.SetBackgroundColor(ReleaseBackgroundColor); this.Click(); } else if (e.Event.Action == MotionEventActions.Cancel) { view.SetBackgroundColor(ReleaseBackgroundColor); } else { if (PressBackgroundResource > 0) { view.SetBackgroundResource(PressBackgroundResource); } } }; } } return(view); }
public override View GetView(Context context, View convertView, ViewGroup parent) { Context = context; LayoutInflater inflater = LayoutInflater.FromContext(context); View cell = new TextView(context) { TextSize = 16f, Text = Caption }; var radio = _group as RadioGroup; if (radio != null) { string radioValue = GetSelectedValue(); cell = DroidResources.LoadStringElementLayout(context, convertView, parent, LayoutId, out _caption, out _value); if (cell != null) { _caption.Text = Caption; _value.Text = radioValue; this.Click = (o, e) => { SelectRadio(); }; } } else if (_group != null) { int count = 0; foreach (var s in Sections) { foreach (var e in s.Elements) { var ce = e as CheckboxElement; if (ce != null) { if (ce.Value) { count++; } continue; } var be = e as BoolElement; if (be != null) { if (be.Value) { count++; } continue; } } } //cell.DetailTextLabel.Text = count.ToString(); } else if (_summarySection != -1 && _summarySection < Sections.Count) { var s = Sections[_summarySection]; //if (summaryElement < s.Elements.Count) // cell.DetailTextLabel.Text = s.Elements[summaryElement].Summary(); } //cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; return(cell); }