简体   繁体   English

Android管理不同屏幕上的视图大小

[英]Android Manage view sizes on different screens

I want to make my view Responsive, look at following images. 我想让我的观点响应,看下面的图像。

在此输入图像描述

在此输入图像描述

1st Image is what it should ideally look. 1st Image是理想的外观。 But when I change the screen size, it changes the size and alignment. 但是当我改变屏幕尺寸时,它会改变尺寸和对齐方式。 I want fixed size views over all screens. 我希望所有屏幕都有固定大小的视图。

You should follow Step by Step approach . 您应该遵循循序渐进的方法。

Android runs on a variety of devices that offer different screen sizes and densities. Android可在各种提供不同屏幕尺寸和密度的设备上运行。 For applications, the Android system provides a consistent development environment across devices and handles most of the work to adjust each application's user interface to the screen on which it is displayed. 对于应用程序,Android系统跨设备提供一致的开发环境,并处理大部分工作,以将每个应用程序的用户界面调整到显示它的屏幕。

Read Supporting Multiple Screens . 阅读Supporting Multiple Screens

To optimize your user experience on different screen sizes, you should create a unique layout XML file for each screen size you want to support. 要优化不同屏幕尺寸的用户体验,您应为要支持的每种屏幕尺寸创建唯一的布局XML文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM