From cc0ae2d24b580c4a89e111cf01bcb87b65bbfe7c Mon Sep 17 00:00:00 2001 From: XinYiWorld <1349308479@qq.com> Date: Wed, 3 May 2017 14:15:57 +0800 Subject: [PATCH] bug try to fix --- .../taskArtifacts/cache.properties.lock | Bin 17 -> 17 bytes .idea/workspace.xml | 116 ++++++++++++++++-- .../czsuperadapter/main/CZSuperAdapter.java | 8 +- samples/samples.iml | 16 +-- 4 files changed, 120 insertions(+), 20 deletions(-) diff --git a/.gradle/2.14.1/taskArtifacts/cache.properties.lock b/.gradle/2.14.1/taskArtifacts/cache.properties.lock index 162c36717b94700db751369604b6a786dfd3e11c..068c0c0f011cdec3d46a118eb17bccb480e54d2b 100644 GIT binary patch literal 17 WcmZQ(xKhg9xTmv*0R))-?gRiXGzC%s literal 17 WcmZQ(xKhg9xTmv*0R))-ZUz7@E(J^g diff --git a/.idea/workspace.xml b/.idea/workspace.xml index cf51a41..e9ffba6 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -25,8 +25,8 @@ - + @@ -72,13 +72,56 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2656,8 +2699,7 @@ - - + @@ -2678,7 +2720,8 @@ - + + @@ -2993,7 +3036,7 @@ - + @@ -3004,7 +3047,7 @@ - + @@ -3013,7 +3056,7 @@ - + @@ -3037,6 +3080,22 @@ + + + + + + + + + + + + + + + + @@ -3104,10 +3163,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + diff --git a/libary/src/main/java/com/xinyi/czsuperadapter/main/CZSuperAdapter.java b/libary/src/main/java/com/xinyi/czsuperadapter/main/CZSuperAdapter.java index 10588f6..1100fa2 100644 --- a/libary/src/main/java/com/xinyi/czsuperadapter/main/CZSuperAdapter.java +++ b/libary/src/main/java/com/xinyi/czsuperadapter/main/CZSuperAdapter.java @@ -4,6 +4,7 @@ import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; +import android.view.View; import android.view.ViewGroup; import com.xinyi.czsuperadapter.ICRUDAdapter; @@ -162,7 +163,12 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { multiTypeMaker.bindViewHolder(commonViewHolder, multiTypeMaker.getData(), MultiTypeMaker.TYPE_HEADER, position - refreshControllerCount); break; case MultiTypeMaker.TYPE_NORMAL: //主体布局 - if(mNormalData.isEmpty()) break; + if(mNormalData.isEmpty()) { + ((CommonViewHolder) holder).getParent().setVisibility(View.GONE); + break; + } + ((CommonViewHolder) holder).getParent().setVisibility(View.VISIBLE); + multiTypeMaker.bindViewHolder(commonViewHolder, mNormalData.get(normalViewStartPosition), multiTypeMaker.getType(normalViewStartPosition), normalViewStartPosition); //绑定点击事件 if(onItemClickListener != null){ diff --git a/samples/samples.iml b/samples/samples.iml index b35c29b..ad7f82a 100644 --- a/samples/samples.iml +++ b/samples/samples.iml @@ -66,14 +66,6 @@ - - - - - - - - @@ -82,6 +74,14 @@ + + + + + + + +