Mediaplayer now only switches to fullscreen when playing video

This commit is contained in:
daniel oeh 2012-07-01 21:31:00 +02:00
parent 36cafbc788
commit 5a0f1f49c9
1 changed files with 4 additions and 3 deletions

View File

@ -157,9 +157,7 @@ public class MediaplayerActivity extends SherlockFragmentActivity implements
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d(TAG, "Creating Activity");
requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
orientation = getResources().getConfiguration().orientation;
manager = FeedManager.getInstance();
getWindow().setFormat(PixelFormat.TRANSPARENT);
@ -386,6 +384,9 @@ public class MediaplayerActivity extends SherlockFragmentActivity implements
videoview.setOnClickListener(playbuttonListener);
videoview.setOnTouchListener(onVideoviewTouched);
setupVideoControlsToggler();
requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
}