|
|
@@ -119,6 +119,9 @@ public class ContentsAdapter extends RecyclerView.Adapter<ContentsHolder> {
|
|
|
seriesListBean.setContentsItemNumber(itemNumber);
|
|
|
holder.bind(activity, position, seriesListBean, getItemCount(), eventListener);
|
|
|
}
|
|
|
+ else if (holder instanceof ContentsWithShownHolder) {
|
|
|
+ holder.bindInternal();
|
|
|
+ }
|
|
|
else {
|
|
|
Log.e("APP# ContentsAdapter | onBindViewHolder", "| position: " + position + " - " + this.hashCode());
|
|
|
ContentsDetailBean bean = contentsDetailBeans.get(position);
|
|
|
@@ -141,7 +144,7 @@ public class ContentsAdapter extends RecyclerView.Adapter<ContentsHolder> {
|
|
|
if (null == contentsDetailBeans) {
|
|
|
return 0;
|
|
|
}
|
|
|
- return contentsDetailBeans.size() + (hasSeries() ? 1 : 0);
|
|
|
+ return contentsDetailBeans.size() + (hasSeries() ? 1 : 0) + 1;
|
|
|
}
|
|
|
|
|
|
protected boolean hasSeries() {
|
|
|
@@ -150,13 +153,18 @@ public class ContentsAdapter extends RecyclerView.Adapter<ContentsHolder> {
|
|
|
|
|
|
protected int getSeriesPosition() {
|
|
|
if (hasSeries()) {
|
|
|
- return getItemCount() - 1;
|
|
|
+ //return getItemCount() - 1;
|
|
|
+ return getItemCount() - 2;
|
|
|
}
|
|
|
else {
|
|
|
return -1;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ protected int getShownWithContentsPosition() {
|
|
|
+ return getItemCount() - 1;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public int getItemViewType(int position) {
|
|
|
int type = CARD_LISTICLE_COVER;
|
|
|
@@ -180,6 +188,9 @@ public class ContentsAdapter extends RecyclerView.Adapter<ContentsHolder> {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ else if (position == getShownWithContentsPosition()) {
|
|
|
+ return WITH_SHOWN_CONTENTS;
|
|
|
+ }
|
|
|
else {
|
|
|
// contents
|
|
|
switch (listType) {
|