I am trying to show Icon_drawble in a ActionBar, but when R.drawable.ic_drawer is in the first position show return arrow in actionbar.
like this:
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mDrawerToggle = new ActionBarDrawerToggle(
this,
mDrawerLayout,
R.drawable.ic_drawer,
R.string.drawer_open,
R.string.drawer_close
) {
I need to show something like this, but the code above It doesnt work.
If I change R.drawable.ic_drawer to another position,it give me the follow logcat error.
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mDrawerToggle = new ActionBarDrawerToggle(
this,
mDrawerLayout,
R.string.drawer_open,
R.drawable.ic_drawer,//another position
R.string.drawer_close
)
Logcat:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.navegatiodrawer/com.example.navegatiodrawer.MainActivity}: android.content.res.Resources$NotFoundException: File Open navigation drawer from drawable resource ID