protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.activity_main); if (bundle != null) { _useAdapter2 = bundle.GetBoolean("useAdapter2", false); var colorInt = bundle.GetInt("color", -1); if (colorInt != -1) { _currentColor = new Color(colorInt); } } _drawableCallback = new DrawableCallback(this); _tabs = FindViewById <PagerSlidingTabStrip.PagerSlidingTabStrip>(Resource.Id.tabs); _pager = FindViewById <ViewPager>(Resource.Id.pager); int pageMargin = (int)TypedValue.ApplyDimension(ComplexUnitType.Dip, 4, Resources.DisplayMetrics); _pager.PageMargin = pageMargin; //_pager.Adapter = _adapter; InitAdapter(); //_tabs.SetViewPager(_pager); ChangeColor(_currentColor); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.activity_main); if (bundle != null) { _useAdapter2 = bundle.GetBoolean("useAdapter2", false); var colorInt = bundle.GetInt("color", -1); if(colorInt != -1) _currentColor = new Color(colorInt); } _drawableCallback = new DrawableCallback(this); _tabs = FindViewById<PagerSlidingTabStrip.PagerSlidingTabStrip>(Resource.Id.tabs); _pager = FindViewById<ViewPager>(Resource.Id.pager); int pageMargin = (int)TypedValue.ApplyDimension(ComplexUnitType.Dip, 4, Resources.DisplayMetrics); _pager.PageMargin = pageMargin; //_pager.Adapter = _adapter; InitAdapter(); //_tabs.SetViewPager(_pager); ChangeColor(_currentColor); }