如何使Android应用程序以不同的分辨率工作? [英] How to make android app work in different resolutions?

查看:85
本文介绍了如何使Android应用程序以不同的分辨率工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经完成了应用的制作,现在遇到的问题是我刚刚制作的应用无法在分辨率不同的手机中正常工作,例如仅显示一半的屏幕视图.如何使它在所有具有不同分辨率的智能手机中正常工作?

I've finished app making and now facing issues that the app i just made doesn't work well in phone with varying resolutions like only half view of screen is shown. How can I make it work properly in all smartphones with different resolutions?

推荐答案

您应该创建多个具有相同名称的.xml文件,并为大小,方向,国家/地区等添加一些限定符,以使您的应用在所有设备上都能正常运行

You should create multiple .xml files with same name, and add some qualifiers for the size, orientation, country etc in order to make your app works on every devices.

这是在Android Studio中创建新的.xml文件时所拥有的

This is what you have when you create new .xml files in Android Studio

这篇关于如何使Android应用程序以不同的分辨率工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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