Hi everyone. I am creating an Android app in Xamarin and wanna display 3 Action Bar Tabs (Dashboard, Dialer & Reports). I am a relatively new in android and below is my code. there is no error but no matter what the Action bar is not visible. The page is blank with just the Application Icon and Application name in it. I am using Jelly bean 4.0.3 emmulator with API 15.My project targets API 15 and has minimum version set to API 15 too. please help as i am really stuck with this.
`namespace NIITDehradun
{
[Activity (Label = "NIIT")]
public class mainniitActivity : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
RequestWindowFeature (WindowFeatures.ActionBar);
var actionBar = this.ActionBar;
actionBar.NavigationMode = ActionBarNavigationMode.Tabs;
var tab1 = this.ActionBar.NewTab ();
tab1.SetText (Resource.String.tabdashname);
tab1.SetIcon (Resource.Drawable.dashboard);
tab1.TabSelected+= (sender, e) => {
e.FragmentTransaction.Add (Resource.Id.fragment_container, new dashFragment ());
};
actionBar.AddTab (tab1);
var tab2 = this.ActionBar.NewTab ();
tab2.SetText (Resource.String.tabdialername);
tab2.SetIcon (Resource.Drawable.dialer);
tab2.TabSelected+= (sender, e) => {
};
actionBar.AddTab (tab2);
var tab3 = this.ActionBar.NewTab ();
tab3.SetText (Resource.String.tabreportname);
tab3.SetIcon (Resource.Drawable.report);
tab3.TabSelected+= (sender, e) => {
};
actionBar.AddTab (tab3);
SetContentView (Resource.Layout.mainniit);
}
}
}`