Android的编程 - 屏幕分辨率 [英] Android programming - screen resolution

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

问题描述

我是新来的Andr​​oid编程。 我已经看到了不同的手机与在Android上运行不同的屏幕分辨率。 如何创建在所有Android设备的工作原理与任何失真在我的应用程序视图的应用程序......

I'm new to Android programming. I've seen different phones with different screen resolutions that run on Android. How can I create an application that works on all android devices with out any distortion in my application views.....

推荐答案

简短的回答是尺寸畅游所有版面项目是短期的密度无关像素和Android会自动缩放项目大小在来为相同的大小上不同的屏幕。 (您可以缩短 DP 在布局中的XML文件。)

The short answer is to size all your layout items in dip. dip is short for Density-independent pixel and Android automatically scales items sized in dip to be the same size on different screens. (You can shorten dip to dp in your layout XML files.)

长的答复是阅读这篇文章在Android开发者网站。这是漫长的,但我强烈建议从开始到结束至少一次之前,你与你的应用太远阅读它。

The long answer is to read this article on the Android developer website. It is long but I highly recommended reading it from beginning to end at least once before you get too far with you application.

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

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