fixed npe
This commit is contained in:
parent
6c582e6966
commit
85c8aa931d
|
@ -45,8 +45,10 @@ public class ParcelableActivitiesAdapter extends AbsActivitiesAdapter<List<Parce
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isGapItem(int position) {
|
public boolean isGapItem(int adapterPosition) {
|
||||||
return getActivity(position).is_gap && position != getActivityCount() - 1;
|
int dataPosition = adapterPosition - getActivityStartIndex();
|
||||||
|
if (dataPosition < 0 || dataPosition >= getActivityCount()) return false;
|
||||||
|
return getActivity(adapterPosition).is_gap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue