Ответ 1
Нашел мой ответ здесь:
Android: получить представление только о том, какой контакт был выпущен
Похоже, вам нужно перебирать дочерние представления и вручную удалять обнаружение, чтобы узнать, какой вид на данный момент недоступен.
Сделал это, переопределив dispatchTouchEvent на родительском LinearLayout:
LinearLayout parent = new LinearLayout(this.getActivity()){
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
int x = Math.round(ev.getX());
int y = Math.round(ev.getY());
for (int i=0; i<getChildCount(); i++){
LinearLayout child = (LinearLayout)row.getChildAt(i);
if(x > child.getLeft() && x < child.getRight() && y > child.getTop() && y < child.getBottom()){
//touch is within this child
if(ev.getAction() == MotionEvent.ACTION_UP){
//touch has ended
}
}
}
return true;
}
}