ListItemView GetPrimaryView(View convertView, ViewGroup parent) { PrimaryListItem primaryItem = convertView as PrimaryListItem; if (primaryItem == null) { primaryItem = new PrimaryListItem(Rock.Mobile.PlatformSpecific.Android.Core.Context); int height = (int)System.Math.Ceiling(NavbarFragment.GetCurrentContainerDisplayWidth( ) * PrivateConnectConfig.MainPageHeaderAspectRatio); primaryItem.Billboard.LayoutParameters = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, height); primaryItem.HasImage = false; } else { primaryItem.FreeImageResources( ); } if (ParentFragment.Billboard != null) { if (primaryItem.HasImage == false) { primaryItem.HasImage = true; Rock.Mobile.PlatformSpecific.Android.UI.Util.FadeView(primaryItem.Billboard, true, null); } primaryItem.Billboard.SetImageBitmap(ParentFragment.Billboard); } return(primaryItem); }
ListItemView GetPrimaryView( View convertView, ViewGroup parent ) { PrimaryListItem primaryItem = convertView as PrimaryListItem; if ( primaryItem == null ) { primaryItem = new PrimaryListItem( Rock.Mobile.PlatformSpecific.Android.Core.Context ); int height = (int)System.Math.Ceiling( NavbarFragment.GetContainerDisplayWidth( ) * PrivateConnectConfig.MainPageHeaderAspectRatio ); primaryItem.Billboard.LayoutParameters = new LinearLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, height ); primaryItem.HasImage = false; } if ( ParentFragment.Billboard != null ) { if ( primaryItem.HasImage == false ) { primaryItem.HasImage = true; Rock.Mobile.PlatformSpecific.Android.UI.Util.FadeView( primaryItem.Billboard, true, null ); } primaryItem.Billboard.SetImageBitmap( ParentFragment.Billboard ); } return primaryItem; }