RESOLUTION: Use the CORRECT constructor for ActionBarDrawerToggle:
ActionBarDrawerToggle (Activity activity,
DrawerLayout drawerLayout,
Toolbar toolbar, ◄ - THIS IS THE KEY. Previously missing.
int openDrawerContentDescRes,
int closeDrawerContentDescRes)
The main activity should extend AppCompatActivity.
and create an instance of android.support.v7.widget.Toolbar
There are plenty of full code examples online but remember to setSupportActionBar(toolbar); and that is it!
BTW
Here is what my build.gradle looks like:...
android {
compileSdkVersion 21
buildToolsVersion "21.1.0"
...
minSdkVersion 11
targetSdkVersion 21
...
No comments:
Post a Comment