protected override ActionBar OnCreateActionBar(ActionBar bar) { bar.Color = new Color(GetColor(Resource.Color.colorPrimary)); bar.TextColor = Color.White; bar.Title = GetString(Resource.String.app_name); return(bar); }
protected override ActionBar OnCreateActionBar(ActionBar bar) { bar.Color = new Color(GetColor(Resource.Color.colorPrimaryDark)); bar.TextColor = Color.White; bar.Title = GetString(Resource.String.fractions_activity); bar.AddButton(GetDrawable(Resource.Drawable.add), view => { var dialog = new NewFractionDialog(this); dialog.SetSize(Screen.Width / 4 * 3, Screen.Height / 2); dialog.AddButton("Ok", v => { if (String.IsNullOrWhiteSpace(dialog.FractionName)) { return(false); } Fraction fraction = new Fraction(dialog.FractionName); FractionManager.Add(fraction); BuildList(); return(true); }); dialog.ShowAt(view); }); return(bar); }