本文介绍了如何适应不同的应用两个配置像人像,风景中的android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了我的肖像配置应用程序。当我打开我的应用程序在设备的未来portraint配置。但在横向模式我一直缺少一些控件。如何解决屏幕两种配置?

I have done my application in portrait configuration. When I load my application in device its coming portraint configuration. But in landscape mode i keep missing some controls. How can I fix the screen for both configurations?

推荐答案


你可能需要定义不同的布局进行横向和纵向。你可能会迫使Android的选择取决于方向正确的布局。你可以把横向布局的XML文件中的资源\布局的土地和资源\布局画像。当然,它总是使用RelativeLayout的好主意,但它取决于你的应用程序。商祺!


You probably have to define different layouts for landscape and portrait. You could force android to choose the proper layout depending on orientation. You could put landscape layout xml files in "res\layout-land" and portrait in "res\layout". Of course it’s always good idea to use RelativeLayout, but it depends on your application.Regards!

这篇关于如何适应不同的应用两个配置像人像,风景中的android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 17:59