Screen guidance on android

Asked

Viewed 72 times

0

I have an Activity that has is declared in the manifest as Portrait, and I have an image gallery, where when clicked on any of the images I launch this code:

getSupportActionBar(). Hide(); getWindow(). addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

to have the image redirected when placing the device horizontally I tried this:

Activity.setRequestedOrientation(Activityinfo.SCREEN_ORIENTATION_FULL_SENSOR);

works more ignores the commands to hide actionBar and the previously set fullscreen flag.

1 answer

2

Try to put it like this:

activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);

getSupportActionBar(). Hide(); getWindow(). addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.