I am working on Navigation Drawer Layout. Another layout must load in place of the drawer_layout onClick of the navigation items.
if (id == R.id.nav_camera) {
//code to inflate another layout inplace of current layout
//setContentView(R.layout.another_layout1);
} else if (id == R.id.nav_gallery) {
//code to inflate another layout inplace of current layout
//setContentView(R.layout.another_layout2);
}
How to load another layout in the mainlayout.?