I am wondering if there any way to use new DrawerLayout from support library with ActionBarSherlock? I found workaround for ICS+ but what i need is support for android 2.2+ The problem is that ABS hold reference for original android.view.MenuItem only when ICS+ but for older version there is inner implementation that not hold reference for original one.
If you are looking a way to open and close the DrawerLayout when user touch Icon from ActionBar, you can use this:
switch (item.getItemId()) {
case android.R.id.home:
if (mDrawerLayout.isDrawerOpen(mDrawerList)) {
mDrawerLayout.closeDrawer(mDrawerList);
} else {
mDrawerLayout.openDrawer(mDrawerList);
}
return true;
}
return true;
}
There is a project on GitHub that works perfectly
SherlockNavigationDrawer
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With