开发者

how to track the screen in landscape or portrait view in android?

I worked in a tabactivity, I set the gravity for tabs as bottom. If I change the s开发者_如何学Gocreen from portrait to landscape, I can't see the tabs.

How can I do it? I need an example please.

Thanks.


Assuming you do not have a separate XML file dedicated to landscape format, you might need to create one and specify the landscape-layout look.

Create another main.xml file with the specifics of how your program should look in landscape mode. The file shoud reside inside your res/layout-land/ folder.

When that is all said and done, in potrait orientation, Android will use main.xml found in res/layout and in landscape main.xml found in res/layout-land.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜