Update EasyRecyclerView item view checked state

This commit is contained in:
seven332 committed 2015-04-05 14:06:08 +08:00
1 parent 8810249fc7
commit 30038a8f3e
1 file changed
+7 -7
@@ -734,13 +734,6 @@ public class EasyRecyclerView extends RecyclerView {
return handled;
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
updateOnScreenCheckedViews();
}
/**
* Register a callback to be invoked when an item in this AdapterView has
* been clicked.
@@ -759,6 +752,13 @@ public class EasyRecyclerView extends RecyclerView {
mOnItemLongClickListener = listener;
}
/**
* If choice mode is set, call it in {@link Adapter#onBindViewHolder}
*/
public void checkItemCheckedState(View view, int position) {
setViewChecked(view, isItemChecked(position));
}
/*
@Override
public Parcelable onSaveInstanceState() {