head问题已解决
This commit is contained in:
@@ -99,12 +99,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="140dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:layout_height="135dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/recommend_bg">
|
||||
|
||||
</ImageView>
|
||||
Reference in New Issue
Block a user