Exemplo n.º 1
0
                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);
                }
Exemplo n.º 2
0
        protected override void OnCreate( Bundle bundle )
        {
            base.OnCreate( bundle );

            // see if this device will support wide landscape (like, if it's a tablet)
            if ( MainActivity.SupportsLandscapeWide( this ) && Rock.Mobile.PlatformSpecific.Android.Core.IsOrientationUnlocked( this ) )
            {
                RequestedOrientation = Android.Content.PM.ScreenOrientation.FullSensor;
            }
            else
            {
                RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait;
            }

            Window.AddFlags( WindowManagerFlags.Fullscreen );


            // Set our view from the "main" layout resource
            SetContentView( Resource.Layout.Splash );

            // load our image.
            RelativeLayout layout = FindViewById<RelativeLayout>(Resource.Id.fragment_container);

            SplashImage = new AspectScaledImageView( this );
            SplashImage.LayoutParameters = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent );
            SplashImage.SetScaleType( ImageView.ScaleType.CenterCrop );
            layout.AddView( SplashImage );

            SplashBitmap = BitmapFactory.DecodeResource( Rock.Mobile.PlatformSpecific.Android.Core.Context.Resources, Resource.Drawable.splash_combo_android );
            SplashImage.SetImageBitmap( SplashBitmap );

            System.Timers.Timer splashTimer = new System.Timers.Timer();
            splashTimer.Interval = 500;
            splashTimer.AutoReset = false;
            splashTimer.Elapsed += (object sender, System.Timers.ElapsedEventArgs e) => 
                {

                    RunOnUiThread( delegate
                        {
                            // launch create order intent, which should be a FORM
                            Intent intent = new Intent(this, typeof(MainActivity));
                            StartActivity(intent);
                        });
                };

            splashTimer.Start( );
        }
Exemplo n.º 3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // see if this device will support wide landscape (like, if it's a tablet)
            if (MainActivity.SupportsLandscapeWide(this) && Rock.Mobile.PlatformSpecific.Android.Core.IsOrientationUnlocked(this))
            {
                RequestedOrientation = Android.Content.PM.ScreenOrientation.FullSensor;
            }
            else
            {
                RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait;
            }

            Window.AddFlags(WindowManagerFlags.Fullscreen);

            Rock.Mobile.Util.URL.Override.SetAppUrlOverrides(PrivateGeneralConfig.App_URL_Overrides);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Splash);

            // load our image.
            RelativeLayout layout = FindViewById <RelativeLayout>(Resource.Id.fragment_container);

            SplashImage = new AspectScaledImageView(this);
            SplashImage.LayoutParameters = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent);
            SplashImage.SetScaleType(ImageView.ScaleType.CenterCrop);
            layout.AddView(SplashImage);

            SplashBitmap = BitmapFactory.DecodeResource(Rock.Mobile.PlatformSpecific.Android.Core.Context.Resources, Resource.Drawable.splash_combo_android);
            SplashImage.SetImageBitmap(SplashBitmap);

            System.Timers.Timer splashTimer = new System.Timers.Timer();
            splashTimer.Interval  = 500;
            splashTimer.AutoReset = false;
            splashTimer.Elapsed  += (object sender, System.Timers.ElapsedEventArgs e) =>
            {
                RunOnUiThread(delegate
                {
                    // launch create order intent, which should be a FORM
                    Intent intent = new Intent(this, typeof(MainActivity));
                    StartActivity(intent);
                });
            };

            splashTimer.Start( );
        }
Exemplo n.º 4
0
                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 );
                }