private void setUpUITabs() { // Set nav mode ActionBar.NavigationMode = ActionBarNavigationMode.Tabs; // Register our tabs ActionBar.AddNewTab("Main", () => { inDebug = false; SetContentView(Resource.Layout.ScaleImage); _imgMap = FindViewById <CustomImageView>(Resource.Id.imgMap); _mapMaker.CIVInstance = _imgMap; _imgMap.LongPress += ImgMapOnLongPress; // Set up spinner setUpRoomsSpinner(_mapMaker.PathfindingGraph.Rooms); // Reset to saved state _mapMaker.DrawMap(); }); ActionBar.AddNewTab("Settings", () => { inDebug = false; SetContentView(Resource.Layout.ImageSettings); _btnDrawGridToggle = FindViewById <ToggleButton>(Resource.Id.drawGridCB); _btnDrawGridToggle.Click += DrawGridButtonToggle; // Reset to saved state if (_mapMaker.DrawGrid) { _btnDrawGridToggle.Checked = true; } }); ActionBar.AddNewTab("Debug", () => { inDebug = true; SetContentView(Resource.Layout.Debug); _stepText = FindViewById <TextView>(Resource.Id.scSD); _azimuthText = FindViewById <TextView>(Resource.Id.azimuth); _XAccelText = FindViewById <TextView>(Resource.Id.XAccel); _YAccelText = FindViewById <TextView>(Resource.Id.YAccel); _ZAccelText = FindViewById <TextView>(Resource.Id.ZAccel); _realX = FindViewById <TextView>(Resource.Id.realX); _realY = FindViewById <TextView>(Resource.Id.realY); }); }