开发者

Using an application in Landscape mode also?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜