Disable navigation separator click

This commit is contained in:
M66B
2018-12-30 08:12:40 +00:00
parent f03819635c
commit a207fc1f6b

View File

@@ -177,8 +177,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
DrawerItem item = (DrawerItem) parent.getAdapter().getItem(position);
switch (item.getId()) {
case 0: // separator
return;
case -1:
onMenuFolders((long) item.getData());
break;
@@ -1024,6 +1022,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
return row;
}
@Override
public boolean isEnabled(int position) {
DrawerItem item = getItem(position);
return (item != null && item.id != 0);
}
}
BroadcastReceiver receiver = new BroadcastReceiver() {