コード例 #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);

            Animation animBtn = AnimationUtils.LoadAnimation(ApplicationContext, Resource.Animation.fadeInBtn);
            Animation anim    = AnimationUtils.LoadAnimation(ApplicationContext, Resource.Animation.fade_in);

            resultTxt = FindViewById <TextView>(Resource.Id.txtresult);
            myBtn     = FindViewById <Button>(Resource.Id.MyButton);

            FlatUI.FlatUI.SetActivityTheme(this, FlatTheme.Grape());

            myBtn.StartAnimation(animBtn);

            string[] resultFraze = Resources.GetStringArray(Resource.Array.yes);

            int max = resultFraze.Length;

            myBtn.Click += delegate {
                resultTxt.Text = resultFraze[r.Next(0, max)];
                resultTxt.StartAnimation(anim);
            };
        }
コード例 #2
0
 void ChangeTheme(FlatTheme theme)
 {
     //Set default them
     FlatUI.FlatUI.DefaultTheme = theme;
     //Change the action bar
     FlatUI.FlatUI.SetActionBarTheme(this, FlatUI.FlatUI.DefaultTheme, false);
     //Change the activity theme
     FlatUI.FlatUI.SetActivityTheme(this, theme);
 }
コード例 #3
0
ファイル: MainActivity.cs プロジェクト: huguodong/FlatUI-1.0
		void ChangeTheme(FlatTheme theme)
		{
			//Set default them
			FlatUI.FlatUI.DefaultTheme = theme;
			//Change the action bar
			FlatUI.FlatUI.SetActionBarTheme (this, FlatUI.FlatUI.DefaultTheme, false);
			//Change the activity theme
			FlatUI.FlatUI.SetActivityTheme (this, theme);
		}