如何适应不同的应用两个配置像人像,风景中的android?人像、不同、两个、风景

由网友(眉间意难了)分享简介:我已经做了我的肖像配置应用程序。当我打开我的应用程序在设备的未来portraint配置。但在横向模式我一直缺少一些控件。如何解决屏幕两种配置?I have done my application in portrait configuration. When I load my application in devi...

我已经做了我的肖像配置应用程序。当我打开我的应用程序在设备的未来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 "reslayout-land" and portrait in "reslayout". Of course it’s always good idea to use RelativeLayout, but it depends on your application. Regards!

阅读全文

相关推荐

最新文章