protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.main_activity); SetFullscreen(); view = FindViewById(Resource.Id.main_parent_view); // 액션바 toolbar = FindViewById <Toolbar>(Resource.Id.main_toolbar); SetSupportActionBar(toolbar); actionBar = SupportActionBar; actionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_menu_white); actionBar.SetDisplayHomeAsUpEnabled(true); actionBar.Title = Resources.GetString(Resource.String.ApplicationName); actionBar.Show(); TabLayoutViewPager(); NaviView(); //var position = tabLayout.SelectedTabPosition; //viewPager.SetCurrentItem(0, true); actionBar.SetBackgroundDrawable(new ColorDrawable(Resources.GetColor(Resource.Color.tab1_actionbar_background))); tabLayout.Background = new ColorDrawable(Resources.GetColor(Resource.Color.tab1_tablayout_background)); tabLayout.SetSelectedTabIndicatorColor(Resources.GetColor(Resource.Color.tab1_tabindicator_background)); }
public void OnFullscreen(bool fullscreen) { Android.Support.V7.App.ActionBar actionBar = SupportActionBar; if (actionBar != null) { if (fullscreen) { actionBar.Hide(); } else { actionBar.Show(); } } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.main_activity); SetFullscreen(); view = FindViewById(Resource.Id.main_parent_view); // 액션바 toolbar = FindViewById<Toolbar>(Resource.Id.main_toolbar); SetSupportActionBar(toolbar); actionBar = SupportActionBar; actionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_menu_white); actionBar.SetDisplayHomeAsUpEnabled(true); actionBar.Title = Resources.GetString(Resource.String.ApplicationName); actionBar.Show(); TabLayoutViewPager(); NaviView(); //var position = tabLayout.SelectedTabPosition; //viewPager.SetCurrentItem(0, true); actionBar.SetBackgroundDrawable(new ColorDrawable(Resources.GetColor(Resource.Color.tab1_actionbar_background))); tabLayout.Background = new ColorDrawable(Resources.GetColor(Resource.Color.tab1_tablayout_background)); tabLayout.SetSelectedTabIndicatorColor(Resources.GetColor(Resource.Color.tab1_tabindicator_background)); }