I am trying to add a vertical linear layout (having a title, image, menu title, listview and an icon at the bottom)to the navigation drawer. However the app crashes displayi
Your query is difficult to understand without code & stacktrace, but anyway..
Remember android.support.v4.widget.DrawerLayout can have 3 elements only (in exactly this order):
Your main page
Left Drawer
Right Drawer
Copy paste this example(only first two elements are there) & continue with your requirements
Your Activity:
public class MainActivity extends Activity {
RelativeLayout leftRL;
RelativeLayout rightRL;
DrawerLayout drawerLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// I'm removing the ActionBar.
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.temp);
leftRL = (RelativeLayout)findViewById(R.id.whatYouWantInLeftDrawer);
drawerLayout = (DrawerLayout)findViewById(R.id.drawer_layout);
}
public void onOpenLeftDrawer(View view)
{
drawerLayout.openDrawer(leftRL);
}
}