protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.AboutDialog); if (ActionBar != null) { this.Title = ActionBar.Title = GetString(Resource.String.about_title); ActionBar.SetDisplayUseLogoEnabled(false); ActionBar.SetIcon(new ColorDrawable(Color.Transparent)); ActionBar.SetHomeButtonEnabled(false); ActionBar.SetDisplayHomeAsUpEnabled(true); ActionBar.SetDisplayShowHomeEnabled(true); ActionBar.SetDisplayShowTitleEnabled(true); } var frag = new AboutFragment(); FragmentManager.BeginTransaction() .Replace(Resource.Id.aboutContent, frag) .Commit(); }
private void ListItemClicked(int position, string[] param = null) { if (position > MenuItems.Count - 1) { return; } string key = MenuItems[position]; switch (key.ToLower()) { case "edicola": var eFragment = new EdicolaFragment(); if (param != null && param.Length > 0) { Bundle bundle = new Bundle(); bundle.PutString("path", param[0]); eFragment.Arguments = bundle; } FragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, eFragment, MenuItems[position].ToLower()) .Commit(); break; case "download": if (!DataManager.Get <IPreferencesManager>().Preferences.DownloadEnabled) { var alert = new AlertDialog.Builder(this); alert.SetTitle(GetString(Resource.String.gen_error)); alert.SetMessage(GetString(Resource.String.down_disable)); alert.SetPositiveButton("Ok", (EventHandler <DialogClickEventArgs>)null); alert.Show().SetDivider(); return; } var dFragment = new DownloadFragment(); if (param != null && param.Length > 0) { Bundle bundle = new Bundle(); bundle.PutString("path", param[0]); dFragment.Arguments = bundle; } FragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, dFragment, MenuItems[position].ToLower()) .Commit(); break; case "impostazioni": var sFragment = new SettingsFragment(); FragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, sFragment, MenuItems[position].ToLower()) .Commit(); break; case "crediti": var aFragment = new AboutFragment(); FragmentManager.BeginTransaction() .Replace(Resource.Id.content_frame, aFragment, MenuItems[position].ToLower()) .Commit(); break; default: break; } _CurrentItem = key.ToLower(); _DrawerList.SetItemChecked(position, true); ActionBar.Title = _Title = MenuLabels[key]; //ActionBar.SetTitle(Html.FromHtml ("<font color='#ff0000'>ActionBartitle </font>")); _Drawer.CloseDrawer(_DrawerContent); /*String title = ActionBar.Title; * SpannableString spannablerTitle = new SpannableString(title); * spannablerTitle.SetSpan(new ForegroundColorSpan(Color.Red), 0, spannablerTitle.Length(), SpanTypes.ExclusiveExclusive); * ActionBar.Title = spannablerTitle.ToString();*/ }