解决了head的问题

This commit is contained in:
ScorpioMiku
2018-09-06 17:44:47 +08:00
parent ab0c947242
commit 16d6afce5b
2 changed files with 10 additions and 6 deletions

View File

@@ -100,12 +100,16 @@ public class RecommendFragment extends BaseFragment {
manager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
if (adapter.getItemViewType(position) == RecommendFood.TYPE_BIG ||
adapter.getItemViewType(position) == RecommendFood.TYPE_DETAIL) {
// Logger.d(manager.getSpanCount());
if (position == 0) {
return 2;
} else {
return 1;
if (adapter.getItemViewType(position) == RecommendFood.TYPE_BIG ||
adapter.getItemViewType(position) == RecommendFood.TYPE_DETAIL) {
// Logger.d(manager.getSpanCount());
return 2;
} else {
return 1;
}
}
}
});