Quantcast
Channel: MediaController positioning over VideoView - Stack Overflow
Viewing all articles
Browse latest Browse all 11

Answer by Sasha Shpota for MediaController positioning over VideoView

$
0
0

With java 8:

videoView.setOnPreparedListener(mediaPlayer ->
    mediaPlayer.setOnVideoSizeChangedListener(
        (player, width, height) -> {
            MediaController controller = new MediaController(YourActivity.this);
            videoView.setMediaController(controller);
            controller.setAnchorView(videoView);
        }
    )
);

Viewing all articles
Browse latest Browse all 11

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>