private void SetStatusBackgroundColor() { if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) { Window.DecorView.SystemUiVisibility = (StatusBarVisibility)(SystemUiFlags.LayoutStable | SystemUiFlags.LayoutFullscreen | SystemUiFlags.LayoutHideNavigation); Window.SetStatusBarColor(new Color(ContextCompat.GetColor(this, Resource.Color.black_transparent))); Window.SetNavigationBarColor(new Color(ContextCompat.GetColor(this, Resource.Color.black_transparent))); ViewCompat.SetOnApplyWindowInsetsListener(buttonsLayout, new InsetsListener(InsetsListener.InsetSide.Bottom)); ViewCompat.SetOnApplyWindowInsetsListener(extraLayout, new InsetsListener(InsetsListener.InsetSide.Top)); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); MainActivity.LoadTheme(this); instance = this; SetContentView(Resource.Layout.DownloadQueue); Toolbar toolbar = FindViewById <Toolbar>(Resource.Id.toolbar); ViewCompat.SetOnApplyWindowInsetsListener(toolbar, new FixToolbarPadding()); SetSupportActionBar(toolbar); SupportActionBar.Title = GetString(Resource.String.download_queue); SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.Close); SupportActionBar.SetDisplayHomeAsUpEnabled(true); ListView = FindViewById <RecyclerView>(Resource.Id.list); ListView.SetLayoutManager(new FixedLinearLayoutManager(this)); ListView.SetAdapter(new DownloadQueueAdapter()); }