Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/src/main/java/com/jaychang/srv/SimpleAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public int getItemViewType(int position) {
}

private int getItemViewType(SimpleCell cell) {
return cell.getClass().getName().hashCode();
return cell.getItem().getClass().getName().hashCode();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private boolean isSectionType(int position) {
aClass = aClass.getSuperclass();
}

return clazz.getCanonicalName().equals(aClass.getCanonicalName());
return clazz.getCanonicalName().equals(aClass.getCanonicalName()) || clazz.getCanonicalName().equals(aClass.getSuperclass().getCanonicalName());
}

private Object getItem(int position) {
Expand Down