In my application , i created a navigation drawer using Android studio template. It works perfectly in Android 5.0 above devices but the title bar does not appear in Kitkat devices (only statius bar can be seen) , I was unable to find a solution,
The below is my code
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().show();
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar,R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
Intent intent = getIntent();
linkNo = intent.getIntExtra(FirstMenuFragment.LINK_NO, 0);
//Make firstItem active
navigationView.getMenu().getItem(linkNo).setChecked(true);
}
Thanks in advance