FragmentContainerView using findNavController

As per this issue, when using FragmentContainerView, you need to find the NavController using findFragmentById() rather than using findNavController() when in onCreate(): val navHostFragment = supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment val navController = navHostFragment.navController This is because findNavController(R.id.nav_host_fragment) relies on the Fragment’s View to already be created which isn’t the case when using FragmentContainerView (as it uses … Read more

Action bar navigation modes are deprecated in Android L

The new Android Design Support Library adds TabLayout, providing a tab implementation that matches the material design guidelines for tabs. A complete walkthrough of how to implement Tabs and ViewPager can be found in this video Now deprecated: The PagerTabStrip is part of the support library (and has been for some time) and serves as … Read more

How to change the status bar color in Android?

Android 5.0 Lollipop introduced Material Design theme which automatically colors the status bar based on the colorPrimaryDark value of the theme. Note by realdognose: with Material Design library it will be colorPrimaryVariant This is supported on device pre-lollipop thanks to the library support-v7-appcompat starting from version 21. Blogpost about support appcompat v21 from Chris Banes … Read more