예제 #1
0
		void Initialize ()
		{
			this.LayoutParameters = new RelativeLayout.LayoutParams(-1,Configuration.getHeight (412));// LinearLayout.LayoutParams (Configuration.getWidth (582), Configuration.getHeight (394));
			this.SetGravity(GravityFlags.Center);


			image = new RelativeLayout(context);

			txtTitle = new TextView (context);
			background = new LinearLayout (context);
			linearTitle = new LinearLayout (context);
			linearButton = new LinearLayout (context);
			imgPlay = new ImageButton (context);
			video = new VideoView (context);

			image.SetGravity (GravityFlags.Bottom);
			background.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (582), Configuration.getHeight (111));
			background.Orientation = Orientation.Horizontal;
			background.SetBackgroundColor (Color.ParseColor ("#50000000"));

			linearTitle.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (482), Configuration.getHeight (111));
			linearTitle.Orientation = Orientation.Horizontal;
			linearTitle.SetGravity (GravityFlags.Center);

			linearButton.LayoutParameters = new LinearLayout.LayoutParams (Configuration.getWidth (100), Configuration.getHeight (111));
			linearButton.Orientation = Orientation.Horizontal;
			linearButton.SetGravity (GravityFlags.Center);


			image.LayoutParameters = new RelativeLayout.LayoutParams (Configuration.getWidth (582), Configuration.getHeight (394));
			//image.SetGravity (GravityFlags.Bottom);
			video.LayoutParameters = new ViewGroup.LayoutParams(Configuration.getWidth(582),Configuration.getHeight(394));


			imgPlay.Alpha = 255.0f;
			imgPlay.SetBackgroundColor (Color.Transparent);

			txtTitle.SetTextColor (Color.ParseColor("#ffffff"));
			txtTitle.SetPadding (Configuration.getWidth (20), 0, 0, 0);
			txtTitle.SetTextSize (ComplexUnitType.Px, Configuration.getHeight (40));
			txtTitle.Ellipsize = Android.Text.TextUtils.TruncateAt.End;
			txtTitle.SetMaxLines (2);

			//imgPlay.SetImageBitmap (Bitmap.CreateStxtcaledBitmap (getBitmapFromAsset ("icons/"), Configuration.getWidth (83), Configuration.getHeight (83), true));
			linearTitle.AddView (txtTitle);
			linearButton.AddView (imgPlay);

			background.AddView (linearTitle);
			background.AddView (linearButton);



			image.AddView (background);

			this.AddView (image);
			//this.AddView (background);


		}
예제 #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            // Create your application here

            SetContentView(Resource.Layout.TestTable);

            mainTable = FindViewById <TableLayout> (Resource.Id.maintable);

            for (int i=0; i<10 ; i++){

                // Create a TableRow and give it an ID
                TableRow tr = new TableRow(this);
                tr.Id = 100+i;
                tr.LayoutParameters = new TableRow.LayoutParams(TableRow.LayoutParams.MatchParent, TableRow.LayoutParams.WrapContent);

                // Create a TextView for column 1
                TextView col1 = new TextView(this);
                col1.Id = 200+i;
                col1.Text = ("col1");
                col1.SetPadding(0,0,2,0);
                col1.SetTextColor(Android.Graphics.Color.Black);
                col1.LayoutParameters = new TableRow.LayoutParams(TableRow.LayoutParams.MatchParent, TableRow.LayoutParams.WrapContent);
                tr.AddView(col1);

                // Create a TextView for column 2
                TextView col2 = new TextView(this);
                col2.Id = 300 + i;
                col2.Text = "col2";
                col2.SetPadding(0,0,2,0);
                col2.SetTextColor(Android.Graphics.Color.Black);
                col2.LayoutParameters = new TableRow.LayoutParams(TableRow.LayoutParams.MatchParent, TableRow.LayoutParams.WrapContent);
                tr.AddView(col2);

                // Create a TextView for column 3
                TextView col3 = new TextView(this);
                col3.Id = 500+i;
                col3.Text = DateTime.Now.ToString("dd.MM");
                col3.SetTextColor(Android.Graphics.Color.Black);
                if (i%2 == 0)
                {
                    col1.SetBackgroundColor(Android.Graphics.Color.White);
                    col2.SetBackgroundColor(Android.Graphics.Color.White);
                    col3.SetBackgroundColor(Android.Graphics.Color.White);
                    tr.SetBackgroundColor(Android.Graphics.Color.White);
                }
                else
                {
                    tr.SetBackgroundColor(Android.Graphics.Color.LightGray);
                    col1.SetBackgroundColor(Android.Graphics.Color.LightGray);
                    col2.SetBackgroundColor(Android.Graphics.Color.LightGray);
                    col3.SetBackgroundColor(Android.Graphics.Color.LightGray);
                }
                col3.SetHorizontallyScrolling(false);
                col3.SetMaxLines(100);
                col3.LayoutParameters = new TableRow.LayoutParams(TableRow.LayoutParams.MatchParent, TableRow.LayoutParams.WrapContent, 1f);
                tr.AddView(col3);

                // Add the TableRow to the TableLayout
                mainTable.AddView(tr, new TableLayout.LayoutParams(TableLayout.LayoutParams.MatchParent, TableLayout.LayoutParams.WrapContent));
                //i++;
            }
        }
예제 #3
0
		public void ini(){


			var textFormat = Android.Util.ComplexUnitType.Px;

			var textFormatdip = Android.Util.ComplexUnitType.Dip;

			mainLayout = new RelativeLayout (context);
			mainLayout.LayoutParameters = new RelativeLayout.LayoutParams (-1,-1);

			mainLinearLayout = new LinearLayout (context);
			headerLinearLayout = new LinearLayout (context);
			contentLinearLayout = new LinearLayout (context);
			mainHeaderLinearLayout = new LinearLayout (context);


			imHeader = new ImageView (context);
			titleHeader = new TextView (context);
			AutorHeader = new TextView (context);
			content = new TextView (context);

			titleHeader.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			AutorHeader.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");
			content.Typeface =  Typeface.CreateFromAsset(context.Assets, "fonts/HelveticaNeue.ttf");


			mainLinearLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			mainHeaderLinearLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, Configuration.getHeight(125));
			contentLinearLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, -2);
			headerLinearLayout.LayoutParameters = new LinearLayout.LayoutParams (-1, -1);

			mainLinearLayout.Orientation = Orientation.Vertical;
			mainHeaderLinearLayout.Orientation = Orientation.Horizontal;
			headerLinearLayout.Orientation = Orientation.Vertical;
			contentLinearLayout.Orientation = Orientation.Vertical;


			mainLinearLayout.AddView (mainHeaderLinearLayout);
			mainLinearLayout.AddView (contentLinearLayout);

			mainHeaderLinearLayout.AddView (imHeader);
			mainHeaderLinearLayout.AddView (headerLinearLayout);


			headerLinearLayout.AddView (titleHeader);
			headerLinearLayout.AddView (AutorHeader);
			headerLinearLayout.SetPadding (15, 0, 0, 10);
			AutorHeader.SetPadding (0, 15, 0, 0);

			contentLinearLayout.AddView (content);
			contentLinearLayout.SetPadding (0, 15, 0, 0);


			mainLinearLayout.SetBackgroundResource (Resource.Drawable.border);
			//			mainLinearLayout.SetX (Configuration.getHeight (45));
			//mainLinearLayout.SetY (Configuration.getWidth (500));



			//titleHeader.Text = "Diferentes tipos de aves en Perú";
			titleHeader.SetTextColor (Color.ParseColor ("#FF0080"));
			//titleHeader.SetTextSize (textFormat, Configuration.getHeight (38));
			titleHeader.SetTextSize (textFormatdip, 16.0f);

			titleHeader.SetMaxWidth (Configuration.getWidth (274));
			titleHeader.SetMaxHeight (Configuration.getHeight (80));
			//titleHeader.SetX (Configuration.getHeight (218));titleHeader.SetY (Configuration.getWidth (794-desviacion));
			titleHeader.Ellipsize = TextUtils.TruncateAt.End;
			titleHeader.SetMaxLines(2);


			//AutorHeader.Text = "Autor del Articulo";
			AutorHeader.SetTextColor(Color.ParseColor ("#424242"));
			AutorHeader.SetTextSize (textFormat, Configuration.getHeight (23));
			AutorHeader.SetMaxWidth (Configuration.getWidth (274));
			//AutorHeader.SetMaxHeight (Configuration.getHeight (25));
			//AutorHeader.SetX (Configuration.getHeight (218));AutorHeader.SetY (Configuration.getWidth (895-desviacion));
			AutorHeader.Ellipsize = TextUtils.TruncateAt.End;
			AutorHeader.SetMaxLines(1);

			//content.Text = "Los factores geográficos, climáticos y evolutivos  convierten al Perú en el mejor lugar para realizar la observacion de aves(birthwaching) Tiene 1830 especies de";
			//content.SetTextSize (textFormat, Configuration.getHeight (24));
			content.SetTextSize (textFormatdip, 12.0f);
			content.SetMaxWidth (Configuration.getWidth(501));
			//content.SetX (Configuration.getHeight (68));content.SetY (Configuration.getWidth (951-desviacion));
			//content.Ellipsize = TextUtils.TruncateAt.End;
			//content.SetMaxLines(4);

			//imHeader.SetImageBitmap (Bitmap.CreateScaledBitmap (getBitmapFromAsset("icons/user.png"),Configuration.getWidth (124), Configuration.getHeight (124),true));
			//imHeader.SetX (Configuration.getHeight (68));imHeader.SetY (Configuration.getWidth (792-desviacion));
			imHeader.SetMaxWidth (Configuration.getWidth (124));
			imHeader.SetMaxHeight (Configuration.getWidth (124));




			int padW = Configuration.getWidth(45);
			int padH = Configuration.getHeight (15);

			mainLayout.SetPadding (padW,padH,padW,padH);

			mainLayout.AddView (mainLinearLayout);

			/*
			mainLayout.AddView (titleHeader);
			mainLayout.AddView (AutorHeader);
			mainLayout.AddView (content);
			mainLayout.AddView (imHeader);
			*/
		}
                public MessageListItem( Context context ) : base( context )
                {
                    SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BackgroundColor ) );
                    LayoutParameters = new AbsListView.LayoutParams( LayoutParams.MatchParent, LayoutParams.MatchParent );

                    Orientation = Orientation.Vertical;

                    LinearLayout contentLayout = new LinearLayout( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                    contentLayout.LayoutParameters = new LinearLayout.LayoutParams( LayoutParams.MatchParent, LayoutParams.MatchParent );
                    contentLayout.Orientation = Orientation.Horizontal;
                    AddView( contentLayout );

                    TitleLayout = new LinearLayout( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                    TitleLayout.LayoutParameters = new LinearLayout.LayoutParams( LayoutParams.MatchParent, LayoutParams.WrapContent );
                    TitleLayout.Orientation = Orientation.Vertical;
                    ( (LinearLayout.LayoutParams)TitleLayout.LayoutParameters ).Weight = 1;
                    ( (LinearLayout.LayoutParams)TitleLayout.LayoutParameters ).Gravity = GravityFlags.CenterVertical;
                    ( (LinearLayout.LayoutParams)TitleLayout.LayoutParameters ).LeftMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 15 );
                    ( (LinearLayout.LayoutParams)TitleLayout.LayoutParameters ).TopMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 15 );
                    ( (LinearLayout.LayoutParams)TitleLayout.LayoutParameters ).BottomMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 15 );
                    contentLayout.AddView( TitleLayout );

                    Title = new TextView( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                    Title.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent );
                    Title.SetTypeface( Rock.Mobile.PlatformSpecific.Android.Graphics.FontManager.Instance.GetFont( ControlStylingConfig.Font_Bold ), TypefaceStyle.Normal );
                    Title.SetTextSize( Android.Util.ComplexUnitType.Dip, ControlStylingConfig.Medium_FontSize );
                    Title.SetSingleLine( );
                    Title.Ellipsize = Android.Text.TextUtils.TruncateAt.End;
                    Title.SetTextColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.Label_TextColor ) );
                    TitleLayout.AddView( Title );

                    Date = new TextView( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                    Date.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent );
                    Date.SetTypeface( Rock.Mobile.PlatformSpecific.Android.Graphics.FontManager.Instance.GetFont( ControlStylingConfig.Font_Regular ), TypefaceStyle.Normal );
                    Date.SetTextSize( Android.Util.ComplexUnitType.Dip, ControlStylingConfig.Small_FontSize );
                    Date.SetTextColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.TextField_PlaceholderTextColor ) );
                    ( (LinearLayout.LayoutParams)Date.LayoutParameters ).TopMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( -4 );
                    TitleLayout.AddView( Date );

                    Speaker = new TextView( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                    Speaker.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent );
                    Speaker.SetTypeface( Rock.Mobile.PlatformSpecific.Android.Graphics.FontManager.Instance.GetFont( ControlStylingConfig.Font_Regular ), TypefaceStyle.Normal );
                    Speaker.SetTextSize( Android.Util.ComplexUnitType.Dip, ControlStylingConfig.Small_FontSize );
                    Speaker.SetTextColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.TextField_PlaceholderTextColor ) );
                    ( (LinearLayout.LayoutParams)Speaker.LayoutParameters ).TopMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( -4 );
                    Speaker.SetMaxLines( 1 );
                    TitleLayout.AddView( Speaker );

                    // add our own custom seperator at the bottom
                    View seperator = new View( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                    seperator.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, 0 );
                    seperator.LayoutParameters.Height = 2;
                    seperator.SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BG_Layer_BorderColor ) );
                    AddView( seperator );


                    // setup the buttons
                    LinearLayout buttonLayout = new LinearLayout( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                    buttonLayout.LayoutParameters = new LinearLayout.LayoutParams( LayoutParams.MatchParent, LayoutParams.MatchParent );
                    ( (LinearLayout.LayoutParams)buttonLayout.LayoutParameters ).Weight = 1;
                    buttonLayout.Orientation = Orientation.Horizontal;
                    contentLayout.AddView( buttonLayout );

                    Typeface buttonFontFace = Rock.Mobile.PlatformSpecific.Android.Graphics.FontManager.Instance.GetFont( PrivateControlStylingConfig.Icon_Font_Secondary );

                    ListenButton = new Button( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                    ListenButton.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent );
                    ( (LinearLayout.LayoutParams)ListenButton.LayoutParameters ).Weight = 1;
                    ( (LinearLayout.LayoutParams)ListenButton.LayoutParameters ).Gravity = GravityFlags.CenterVertical;
                    ListenButton.SetTypeface( buttonFontFace, TypefaceStyle.Normal );
                    ListenButton.SetTextSize( Android.Util.ComplexUnitType.Dip, PrivateNoteConfig.Details_Table_IconSize );
                    ListenButton.Text = PrivateNoteConfig.Series_Table_Listen_Icon;
                    ListenButton.SetTextColor( Rock.Mobile.UI.Util.GetUIColor( NoteConfig.Details_Table_IconColor ) );
                    ListenButton.Background = null;
                    buttonLayout.AddView( ListenButton );

                    WatchButton = new Button( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                    WatchButton.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent );
                    ( (LinearLayout.LayoutParams)WatchButton.LayoutParameters ).Weight = 1;
                    ( (LinearLayout.LayoutParams)WatchButton.LayoutParameters ).Gravity = GravityFlags.CenterVertical;
                    WatchButton.SetTypeface( buttonFontFace, TypefaceStyle.Normal );
                    WatchButton.SetTextSize( Android.Util.ComplexUnitType.Dip, PrivateNoteConfig.Details_Table_IconSize );
                    WatchButton.Text = PrivateNoteConfig.Series_Table_Watch_Icon;
                    WatchButton.SetTextColor( Rock.Mobile.UI.Util.GetUIColor( NoteConfig.Details_Table_IconColor ) );
                    WatchButton.Background = null;
                    buttonLayout.AddView( WatchButton );

                    TakeNotesButton = new Button( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                    TakeNotesButton.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent );
                    ( (LinearLayout.LayoutParams)TakeNotesButton.LayoutParameters ).Weight = 1;
                    ( (LinearLayout.LayoutParams)TakeNotesButton.LayoutParameters ).Gravity = GravityFlags.CenterVertical;
                    TakeNotesButton.SetTypeface( buttonFontFace, TypefaceStyle.Normal );
                    TakeNotesButton.SetTextSize( Android.Util.ComplexUnitType.Dip, PrivateNoteConfig.Details_Table_IconSize );
                    TakeNotesButton.Text = PrivateNoteConfig.Series_Table_TakeNotes_Icon;
                    TakeNotesButton.SetTextColor( Rock.Mobile.UI.Util.GetUIColor( NoteConfig.Details_Table_IconColor ) );
                    TakeNotesButton.Background = null;
                    buttonLayout.AddView( TakeNotesButton );

                    ListenButton.Click += (object sender, EventArgs e ) =>
                        {
                            ParentAdapter.OnClick( Position, 0 );
                        };

                    WatchButton.Click += (object sender, EventArgs e ) =>
                        {
                            ParentAdapter.OnClick( Position, 1 );
                        };

                    TakeNotesButton.Click += (object sender, EventArgs e ) =>
                        {
                            ParentAdapter.OnClick( Position, 2 );
                        };
                }
                        public PrayerLayoutRender( RectangleF bounds, float prayerActionHeight, Rock.Client.PrayerRequest prayer )
                        {
                            PrayerActionHeight = prayerActionHeight;

                            // Create the core layout that stores the prayer
                            LinearLayout = new LinearLayout( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                            LinearLayout.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent );
                            LinearLayout.Orientation = Orientation.Vertical;

                            // add the name
                            NameLayout = new BorderedRectView( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                            NameLayout.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent );
                            NameLayout.SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BG_Layer_BorderColor ) );
                            ( (LinearLayout.LayoutParams)NameLayout.LayoutParameters ).Weight = 1;
                            LinearLayout.AddView( NameLayout );

                            Name = new TextView( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                            Name.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent );
                            ((RelativeLayout.LayoutParams)Name.LayoutParameters).TopMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 5 );
                            ((RelativeLayout.LayoutParams)Name.LayoutParameters).LeftMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 5 );
                            ((RelativeLayout.LayoutParams)Name.LayoutParameters).RightMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 5 );
                            ((RelativeLayout.LayoutParams)Name.LayoutParameters).BottomMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 5 );
                            Name.SetTextColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.TextField_ActiveTextColor ) );
                            Name.SetTypeface( Rock.Mobile.PlatformSpecific.Android.Graphics.FontManager.Instance.GetFont( ControlStylingConfig.Font_Bold ), TypefaceStyle.Normal );
                            Name.SetTextSize( ComplexUnitType.Dip, ControlStylingConfig.Small_FontSize );
                            Name.SetMaxLines( 1 );
                            Name.SetSingleLine( );
                            Name.SetHorizontallyScrolling( true );
                            Name.Ellipsize = Android.Text.TextUtils.TruncateAt.End;
                            Name.Text = prayer.FirstName.ToUpper( );
                            NameLayout.AddView( Name );


                            // create the layout for managing the category / date
                            LinearLayout detailsLayout = new LinearLayout( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                            detailsLayout.Orientation = Orientation.Horizontal;
                            detailsLayout.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent );
                            LinearLayout.AddView( detailsLayout );

                            // add the category layout
                            CategoryLayout = new BorderedRectView( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                            CategoryLayout.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent );
                            CategoryLayout.BorderWidth = 1;
                            CategoryLayout.SetBorderColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BG_Layer_Color ) );
                            CategoryLayout.SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BG_Layer_BorderColor ) );
                            ( (LinearLayout.LayoutParams)CategoryLayout.LayoutParameters ).LeftMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( -4 );
                            ( (LinearLayout.LayoutParams)CategoryLayout.LayoutParameters ).RightMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( -1 );
                            ( (LinearLayout.LayoutParams)CategoryLayout.LayoutParameters ).Weight = 1;
                            detailsLayout.AddView( CategoryLayout );

                            // category
                            Category = new TextView( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                            Category.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent );
                            ((RelativeLayout.LayoutParams)Category.LayoutParameters).TopMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 5 );
                            ((RelativeLayout.LayoutParams)Category.LayoutParameters).LeftMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 9 );
                            ((RelativeLayout.LayoutParams)Category.LayoutParameters).RightMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 9 );
                            ((RelativeLayout.LayoutParams)Category.LayoutParameters).BottomMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 5 );
                            Category.SetTextColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.TextField_ActiveTextColor ) );
                            Category.SetTypeface( Rock.Mobile.PlatformSpecific.Android.Graphics.FontManager.Instance.GetFont( ControlStylingConfig.Font_Light ), TypefaceStyle.Normal );
                            Category.SetTextSize( ComplexUnitType.Dip, ControlStylingConfig.Small_FontSize );
                            Category.SetMaxLines( 1 );
                            Category.SetSingleLine( );
                            Category.SetHorizontallyScrolling( true );
                            Category.Ellipsize = Android.Text.TextUtils.TruncateAt.End;
                            Category.Text = prayer.CategoryId.HasValue ? RockGeneralData.Instance.Data.PrayerIdToCategory( prayer.CategoryId.Value ) : RockGeneralData.Instance.Data.PrayerCategories[ 0 ].Name;
                            CategoryLayout.AddView( Category );



                            // add the date layout
                            DateLayout = new BorderedRectView( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                            DateLayout.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent );
                            DateLayout.BorderWidth = 1;
                            DateLayout.SetBorderColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BG_Layer_Color ) );
                            DateLayout.SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BG_Layer_BorderColor ) );
                            ( (LinearLayout.LayoutParams)DateLayout.LayoutParameters ).LeftMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( -1 );
                            ( (LinearLayout.LayoutParams)DateLayout.LayoutParameters ).RightMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( -4 );
                            ( (LinearLayout.LayoutParams)DateLayout.LayoutParameters ).Weight = 1;
                            detailsLayout.AddView( DateLayout );

                            // date
                            Date = new TextView( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                            Date.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent );
                            ((RelativeLayout.LayoutParams)Date.LayoutParameters).TopMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 5 );
                            ((RelativeLayout.LayoutParams)Date.LayoutParameters).RightMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 13 );
                            ((RelativeLayout.LayoutParams)Date.LayoutParameters).BottomMargin = (int)Rock.Mobile.Graphics.Util.UnitToPx( 5 );
                            ((RelativeLayout.LayoutParams)Date.LayoutParameters ).AddRule( LayoutRules.AlignParentRight );
                            Date.SetTextColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.TextField_ActiveTextColor ) );
                            Date.SetTypeface( Rock.Mobile.PlatformSpecific.Android.Graphics.FontManager.Instance.GetFont( ControlStylingConfig.Font_Light ), TypefaceStyle.Normal );
                            Date.SetTextSize( ComplexUnitType.Dip, ControlStylingConfig.Small_FontSize );
                            Date.Text = string.Format( "{0:MM/dd/yy}", prayer.EnteredDateTime );
                            DateLayout.AddView( Date );






                            // actual prayer
                            Prayer = new TextView( Rock.Mobile.PlatformSpecific.Android.Core.Context );
                            UpdatePrayerLayout( bounds );
                            Prayer.SetTextColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.TextField_PlaceholderTextColor ) );
                            Prayer.SetTypeface( Rock.Mobile.PlatformSpecific.Android.Graphics.FontManager.Instance.GetFont( ControlStylingConfig.Font_Regular ), TypefaceStyle.Normal );
                            Prayer.SetTextSize( ComplexUnitType.Dip, ControlStylingConfig.Medium_FontSize );
                            Prayer.Text = prayer.Text;
                            LinearLayout.AddView( Prayer );
                        }