开发者

Using an application in Landscape mode also?

开发者 https://www.devze.com 2023-03-29 13:37 出处:网络
I\'ve an application running successfully, the application runs only in portrait mode only, if i\'m going to change this to landscape, it\'s also possible to change. But, it won\'t never come to portr

I've an application running successfully, the application runs only in portrait mode only, if i'm going to change this to landscape, it's also possible to change. But, it won't never come to portrait mode. How can i u开发者_Go百科se these (portrait & landscape) in same time? Is it possible? Thanks in advance.


use this code where you have to change portrait to landscape,

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

use this to change landscape to portrait.

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);


if you want the app to run in land and port you don't need to place anything just take out the code line that is forcing it. Hope it helps

0

精彩评论

暂无评论...
验证码 换一张
取 消