Example #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            //Ask for action bar to show
            Window.RequestFeature(WindowFeatures.ActionBar);

            //Setup our action bar title and icon
            ActionBar.Title = "FlatUI.Xamarin Sample";
            ActionBar.SetIcon(Android.Resource.Drawable.IcMenuInfoDetails);

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

            //Create a custom theme very easily!
            var customJabbrTheme = new FlatUI.FlatTheme()
            {
                DarkAccentColor      = Android.Graphics.Color.ParseColor("#00103f"),
                BackgroundColor      = Android.Graphics.Color.ParseColor("#003259"),
                LightAccentColor     = Android.Graphics.Color.ParseColor("#005191"),
                VeryLightAccentColor = Android.Graphics.Color.ParseColor("#719fc3")
            };

            //Register the them so it will show up when we ask FlatUI for all the available themes
            FlatUI.FlatUI.RegisterCustomTheme("jabbr", customJabbrTheme);

            //Change the theme to our custom one by default
            ChangeTheme(customJabbrTheme);
        }
Example #2
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			//Ask for action bar to show
			Window.RequestFeature (WindowFeatures.ActionBar);

			//Setup our action bar title and icon
			ActionBar.Title = "FlatUI.Xamarin Sample";
			ActionBar.SetIcon (Android.Resource.Drawable.IcMenuInfoDetails);

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

			//Create a custom theme very easily!
			var customJabbrTheme = new FlatUI.FlatTheme () {
				DarkAccentColor = Android.Graphics.Color.ParseColor("#00103f"),
				BackgroundColor = Android.Graphics.Color.ParseColor("#003259"),
				LightAccentColor = Android.Graphics.Color.ParseColor("#005191"),
				VeryLightAccentColor = Android.Graphics.Color.ParseColor("#719fc3")
			};

			//Register the them so it will show up when we ask FlatUI for all the available themes
			FlatUI.FlatUI.RegisterCustomTheme ("jabbr", customJabbrTheme);

			//Change the theme to our custom one by default
			ChangeTheme (customJabbrTheme);
		}