We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9aa005e commit a72b587Copy full SHA for a72b587
app/src/main/java/com/tubb/smrv/demo/rv/SimpleRvActivity.java
@@ -84,6 +84,11 @@ public void onClick(View v) {
84
myViewHolder.tvSwipeEnable.setText(swipeEnable ? "swipe on" : "swipe off");
85
myViewHolder.sml.setSwipeEnable(swipeEnable);
86
}
87
+
88
+ @Override
89
+ public int getItemViewType(int position) {
90
+ return position % 2 == 0 ? VIEW_TYPE_ENABLE : VIEW_TYPE_DISABLE;
91
+ }
92
93
94
public static class SimpleRvViewHolder extends RecyclerView.ViewHolder{
0 commit comments