屏幕方向 [英] screen orientation

查看:135
本文介绍了屏幕方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 android的新手.我遇到了一个问题,即在横向模式下我需要一个布局视图,该视图没有以肖像模式出现的部分.我已经以这种方式为横向视图创建了一个布局.在我给出的活动中像人像显示某些领域或某些hide.It的条件实际上工作正常...首先当我从肖像到风景时它正在提供我想要的...但是当我进入肖像模式时它停止了应用程序.请帮助我.谢谢

Hi M new to android.I faced a problem i.e in landscape mode i need a layout view which doesnot have some feilds which are present in the portrait mode.I have created a layout for landscape view in such a way.In the activity i have given the conditions like if portrait display some feilds some hide.its working properly actually...first when i go from portrait to landscape it is giving what i want...but when i go to portrait mode its stopping the application.please help me.Thanks in advance

推荐答案

您可以制作两个不同的布局,并将它们分别放置在layout-port和layout-land中. 并确保您在清单中为该活动提到了android:configuration ="orientation".如果我对您的理解正确,请尝试一下.

You can make two different layouts and put them in layout-port and layout-land respectively. And make sure that you have mentioned android:configuration = "orientation" in your manifest for that activity. Try it if i have understood you correctly.

这篇关于屏幕方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆