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); }; }
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); }
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); }