1

Is it possible to make a Navigation Drawer in Material Design like the Gmail app on lower API? If it's possible have anyone a Tutorial or a guide to do this? Thanks

Erdnuss
  • 307
  • 4
  • 16
  • off-topic, too broad and also unclear what you're asking, all, at the same time, in one question ... gratz – Selvin Jan 15 '15 at 17:34
  • sorry but Ranjith understood it :) and for you I want to create a Navigation Drawer in Matreial Design which work on lower android versions like Android 4.0 or 2.3. – Erdnuss Jan 16 '15 at 16:31

1 Answers1

1

Use Appcompat library for it, here's a link how to set it up: http://android-developers.blogspot.in/2014/10/appcompat-v21-material-design-for-pre.html

You need to use the Toolbar to show the arrowToggle:

<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>

And in your mainView you need to add this:

setContentView(R.layout.guidelib_activity_main);
mToolbar = (Toolbar)findViewById(R.id.toolbar);
setSupportActionBar(mToolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);

Also refer this question: Appcompat Toolbar Not Showing With Navigation Drawer

Community
  • 1
  • 1
Psypher
  • 10,717
  • 12
  • 59
  • 83