Fix pool limits and y-translation issues with CFv2 recycler view.

This commit is contained in:
Cody Henthorne
2023-06-07 12:51:08 -04:00
committed by GitHub
parent d6a03df087
commit 7e0e6c2786
6 changed files with 101 additions and 6 deletions

View File

@@ -89,6 +89,10 @@ public class MappingAdapter extends ListAdapter<MappingModel<?>, MappingViewHold
registerFactory(clazz, new LayoutFactory<>(creator, layout));
}
public Map<Class<?>, Integer> getItemTypes() {
return new HashMap<>(itemTypes);
}
@Override
public int getItemViewType(int position) {
Integer type = itemTypes.get(getItem(position).getClass());

View File

@@ -93,7 +93,7 @@ public class PagingMappingAdapter<Key> extends MappingAdapter {
return getItem(position) != null;
}
private static class Placeholder implements MappingModel<Placeholder> {
protected static class Placeholder implements MappingModel<Placeholder> {
@Override
public boolean areItemsTheSame(@NonNull Placeholder newItem) {
return false;