Fixed animation when hiding drawer items
This commit is contained in:
parent
0d1241be66
commit
b05d877954
|
@ -159,8 +159,10 @@ public class NavListAdapter extends RecyclerView.Adapter<NavListAdapter.Holder>
|
||||||
int viewType = getItemViewType(position);
|
int viewType = getItemViewType(position);
|
||||||
if (viewType == VIEW_TYPE_SUBSCRIPTION) {
|
if (viewType == VIEW_TYPE_SUBSCRIPTION) {
|
||||||
return itemAccess.getItem(position - getSubscriptionOffset()).id;
|
return itemAccess.getItem(position - getSubscriptionOffset()).id;
|
||||||
|
} else if (viewType == VIEW_TYPE_NAV) {
|
||||||
|
return -Math.abs(fragmentTags.get(position).hashCode()) - 1; // Folder IDs are >0
|
||||||
} else {
|
} else {
|
||||||
return -position - 1; // IDs are >0
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,8 @@ public class NavDrawerData {
|
||||||
public boolean isOpen;
|
public boolean isOpen;
|
||||||
|
|
||||||
public FolderDrawerItem(String name) {
|
public FolderDrawerItem(String name) {
|
||||||
super(DrawerItem.Type.FOLDER, (long) name.hashCode() << 20); // Keep IDs >0 but make room for many feeds
|
// Keep IDs >0 but make room for many feeds
|
||||||
|
super(DrawerItem.Type.FOLDER, (long) Math.abs(name.hashCode()) << 20);
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue