There have been a lot of discussions about how to position a MediaController
and most answers are to use the setAnchorView
-Method. At the first glance this solution seems to work but in my case it doesn't.
According to this Post setAnchorView
only acts as a reference for initial positioning of the MediaController
, but actually creates a new floating Window
on top.
So what I want is a MediaController
that is really bound to a parent View
(e.g. VideoView).
For example if you have a LinearLayout
within a ScrollView
and you have to scroll down to your VideoView
where the MediaController
is attached to, the MediaController
should really be attached to this VideoView
so that the MediaController
scrolls along with the VideoView
.
Another Use-Case where this problem accurs is discussed here, where the MediaController
is used within a ViewPager
.
So how to achieve such a behavior for a MediaController
?