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