I have a parent recyclerview that has 3 child view in it. The last two of the child are recyclerview.
Parent recyclerview
- child view 1
- child view 2 (ho
Short hint to @albertvilacalvo answer: If you use RecyclerView programmatically, you may handle setFocusableInTouchMode that way (include in your RecyclerView class)
@Override
protected void onAttachedToWindow() {
((View) getParent()).setFocusableInTouchMode(true);
super.onAttachedToWindow();
}
The descendantFocusability solution fails if you need EditText in your child views, they would not get cursor anymore. I'm using ListView, custom (multi)touch and EditText in my RecyclerView childs. No sideeffects using setFocusableInTouchMode so far.