Android.NUnitLite.UI.FormattedElement.GetView C# (CSharp) Method

GetView() public method

public GetView ( Android.Content.Context context, Android.Views.View convertView, Android.Views.ViewGroup parent ) : Android.Views.View
context Android.Content.Context
convertView Android.Views.View
parent Android.Views.ViewGroup
return Android.Views.View
		public override View GetView (Context context, View convertView, ViewGroup parent)
		{
			var view = new RelativeLayout(context);
						
            var parms = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent,
                                                        ViewGroup.LayoutParams.WrapContent);

            view.SetMinimumHeight(150);
            parms.SetMargins(5, 3, 5, 0);
            parms.AddRule(LayoutRules.AlignParentLeft);

			_caption = new TextView (context);
			SetCaption (Caption);
            view.AddView(_caption, parms);
			
			if (!String.IsNullOrWhiteSpace (Indicator)) {
	            var tparms = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent,
	                                                         ViewGroup.LayoutParams.WrapContent);
	            tparms.SetMargins(5, 3, 5, 5);
	            tparms.AddRule(LayoutRules.CenterVertical);
				tparms.AddRule(LayoutRules.AlignParentRight);
	
	            _text = new TextView (context) {
					Text = Indicator,
					TextSize = 22f
				};
	            view.AddView(_text, tparms);
			}
			return view;
		}