21 using Android.Content;
25 using MonoDroid.Dialog;
27 namespace Android.NUnitLite.UI {
31 private new TextView _caption;
32 private new TextView _text;
38 public string Indicator {
42 public override View
GetView (Context context, View convertView, ViewGroup parent)
44 var view = convertView as RelativeLayout;
47 view =
new RelativeLayout(context);
49 var parms =
new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent,
50 ViewGroup.LayoutParams.WrapContent);
51 parms.SetMargins(5, 3, 5, 0);
52 parms.AddRule(LayoutRules.AlignParentLeft);
54 _caption =
new TextView (context);
56 view.RemoveAllViews();
57 view.AddView(_caption, parms);
59 if (!String.IsNullOrWhiteSpace (Indicator)) {
60 var tparms =
new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent,
61 ViewGroup.LayoutParams.WrapContent);
62 tparms.SetMargins(5, 3, 5, 5);
63 tparms.AddRule(LayoutRules.CenterVertical);
64 tparms.AddRule(LayoutRules.AlignParentRight);
66 _text =
new TextView (context) {
70 view.AddView(_text, tparms);
77 _caption.SetText (Android.Text.Html.FromHtml (html), TextView.BufferType.Spannable);