Commit 4cba218c authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Prevent ArrayIndexOutOfBoundsException in adapters

parent 353d92f1
...@@ -49,7 +49,7 @@ public class SelectorViewHolder<T extends ViewDataBinding> extends RecyclerView. ...@@ -49,7 +49,7 @@ public class SelectorViewHolder<T extends ViewDataBinding> extends RecyclerView.
@Override @Override
public void onFocusChange(View v, boolean hasFocus) { public void onFocusChange(View v, boolean hasFocus) {
setViewBackground(hasFocus, isSelected()); if (getLayoutPosition() >= 0) setViewBackground(hasFocus, isSelected());
} }
protected boolean isSelected() { protected boolean isSelected() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment