public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (container == null) { // Currently in a layout without a container, so no reason to create our view. return(null); } OOBEView = new UIOOBE( ); RelativeLayout view = inflater.Inflate(Resource.Layout.OOBEView, container, false) as RelativeLayout; view.SetBackgroundColor(Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BG_Layer_Color)); view.SetOnTouchListener(this); string imageName = "splash_logo_android.png"; Point displaySize = new Point( ); Activity.WindowManager.DefaultDisplay.GetSize(displaySize); DisplayMetrics metrics = Resources.DisplayMetrics; string bgImageName = string.Format("oobe_splash_bg_{0}.png", metrics.DensityDpi.ToString( ).ToLower( )); OOBEView.Create(view, bgImageName, imageName, new System.Drawing.RectangleF(0, 0, NavbarFragment.GetFullDisplayWidth( ), this.Resources.DisplayMetrics.HeightPixels), delegate(int index, bool isCampusSelection) { SpringboardParent.OOBEUserClick(index, isCampusSelection); }); return(view); }
public override void ViewDidLoad() { base.ViewDidLoad(); View.Layer.AnchorPoint = CGPoint.Empty; View.BackgroundColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BackgroundColor); // this is totally a hack, but in order to seamlessly transition from the splash screen // to our logo, we need to use a PER-DEVICE image. Sigh. string imageName = GetSplashLogo(UIKit.UIScreen.MainScreen.ApplicationFrame.Size, UIKit.UIScreen.MainScreen.Scale); OOBEView = new UIOOBE(); OOBEView.Create(View, "oobe_splash_bg.png", imageName, View.Frame.ToRectF( ), delegate(int index, bool isCampusSelection) { Springboard.OOBEOnClick(index, isCampusSelection); }); }