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