I'm the king of self-learned badge. Again, I found a solution to my own question: simply add the attribute
android:duplicateParentState="true"
to the inner view.
Domanda
I've a ViewGoroup
that contains a custom control coded by me, a progress wheel that extends View
.
The progress wheel does not have code to manage click or touch.
The container (it's a ViewGroup
) has a touch manager:
@Override
public boolean onTouchEvent(MotionEvent event) {
if (isValueSettable()) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
...
return true;
} else if (event.getAction() == MotionEvent.ACTION_UP) {
return true;
} else if (event.getAction() == MotionEvent.ACTION_CANCEL) {
return true;
}
}
return super.onTouchEvent(event);
}
Ok?
If I click on the ViewGroup
outside the area covered by the inner progress wheel the event is raised and I enter in onTouchEvent()
, but I I flick inside the area of the progress wheel... nothing.
Any ideas?
Soluzione
I'm the king of self-learned badge. Again, I found a solution to my own question: simply add the attribute
android:duplicateParentState="true"
to the inner view.