How to slide ExpandableListView at DrawerLayout form right to left
i want to show ExpandableListView at right corner of screen , how can i do that ??
It is a bug in the home button click in ActionBar that shows itself in line:
if (mDrawerToggle.onOptionsItemSelected(item)) {
return true;
}
remove the lines I mentioned, where you have method:
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
if (mDrawerToggle.onOptionsItemSelected(item)) {
return true;
}
//....
}
and replace it with:
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
if (item != null && item.getItemId() == android.R.id.home) {
if (mDrawerLayout.isDrawerOpen(Gravity.RIGHT)) {
mDrawerLayout.closeDrawer(Gravity.RIGHT);
} else {
mDrawerLayout.openDrawer(Gravity.RIGHT);
}
return true;
}
//...
}
Also do not forget to change the gravity of ListView to right: android:layout_gravity="right"