Reputation: 255
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.
Upvotes: 9
Views: 4708
Reputation: 413
There is a project on GitHub that works perfectly
Hope this helps
Upvotes: 6
Reputation: 573
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;
}
Upvotes: 22