fix surfaceview not registered for context menu

This commit is contained in:
Andrew Dolgov 2015-12-03 13:47:29 +03:00
parent d430e7e49b
commit a7106ca240

View File

@ -56,6 +56,7 @@ public class VideoPlayerActivity extends CommonActivity {
getSupportActionBar().hide();
surfaceView = (SurfaceView) findViewById(R.id.video_player);
registerForContextMenu(surfaceView);
setTitle(getIntent().getStringExtra("title"));
@ -219,10 +220,12 @@ public class VideoPlayerActivity extends CommonActivity {
public void onPrepared(MediaPlayer mp) {
View loadingBar = findViewById(R.id.video_loading);
if (loadingBar != null) loadingBar.setVisibility(View.GONE);
if (loadingBar != null)
loadingBar.setVisibility(View.GONE);
View coverView = findViewById(R.id.video_player_cover);
if (coverView != null) coverView.setVisibility(View.GONE);
if (coverView != null)
coverView.setVisibility(View.GONE);
resizeSurface();
mp.setLooping(true);
@ -246,6 +249,7 @@ public class VideoPlayerActivity extends CommonActivity {
mediaController.setAnchorView(surfaceView);
}
public void onConfigurationChanged(Configuration newConfig) {