public SingleNewsListItem(Context context) : base(context) { SetBackgroundColor(Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BackgroundColor)); RelativeLayout = new RelativeLayout(context); RelativeLayout.LayoutParameters = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent); AddView(RelativeLayout); Billboard = new AspectScaledImageView(context); Billboard.LayoutParameters = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent); Billboard.SetScaleType(ImageView.ScaleType.CenterCrop); Billboard.SetBackgroundColor(Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BackgroundColor)); RelativeLayout.AddView(Billboard); PrivateOverlay = new TextView(context); PrivateOverlay.LayoutParameters = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent); PrivateOverlay.SetBackgroundColor(Android.Graphics.Color.Red); PrivateOverlay.Alpha = .60f; PrivateOverlay.Text = "Private"; PrivateOverlay.Gravity = GravityFlags.Center; RelativeLayout.AddView(PrivateOverlay); }
public SingleNewsListItem( Context context ) : base(context) { SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BackgroundColor ) ); Billboard = new AspectScaledImageView( context ); Billboard.LayoutParameters = new AbsListView.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent ); Billboard.SetScaleType( ImageView.ScaleType.CenterCrop ); Billboard.SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BackgroundColor ) ); AddView( Billboard ); }
public SingleNewsListItem( Context context ) : base( context ) { SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BackgroundColor ) ); RelativeLayout = new RelativeLayout( context ); RelativeLayout.LayoutParameters = new AbsListView.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent ); AddView( RelativeLayout ); Billboard = new AspectScaledImageView( context ); Billboard.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent ); Billboard.SetScaleType( ImageView.ScaleType.CenterCrop ); Billboard.SetBackgroundColor( Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BackgroundColor ) ); RelativeLayout.AddView( Billboard ); PrivateOverlay = new TextView( context ); PrivateOverlay.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent ); PrivateOverlay.SetBackgroundColor( Android.Graphics.Color.Red ); PrivateOverlay.Alpha = .60f; PrivateOverlay.Text = "Private"; PrivateOverlay.Gravity = GravityFlags.Center; RelativeLayout.AddView( PrivateOverlay ); }