正在修改的DP的大小,而不是推荐的各种屏幕尺寸的像素? [英] Is modifying the dp size as opposed to pixels recommended for various screen sizes?

查看:165
本文介绍了正在修改的DP的大小,而不是推荐的各种屏幕尺寸的像素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说,对于屏幕上的一个(240X320:LDPI)的ImageButton的和屏幕B(720X1280:xhdpi),它是建议手动更改为每个独特的布局资源文件的DP(布局宽度和高度),它的大小各种屏幕?或者,创建规模九宫位图图像的每个DPI大小,把它的绘制资源文件,然后将其设置为SRC的ImageButton的?

Say, for an ImageButton on screen A (240X320: ldpi) and screen B (720X1280: xhdpi), is it recommended to manually change the dp (layout-width and height) size of it in each unique layout resource file for various screens? Or, create scaled nine-patch bitmaps for each dpi size of the image, call it on the drawable resource file, and then set it as the src for the ImageButton?

要证明,这里就是我的意思: https://www.youtube.com/watch? v = OtsZbdbC370
...最有可能的,视频是过时的,正确的?

To justify, here's what I mean: https://www.youtube.com/watch?v=OtsZbdbC370 ... Most likely, the video is outdated, correct?

推荐答案

如果你想改变的ImageButton的布局宽度和高度(DP)这完全取决于你。当然是有什么不妥的设置或者的ImageButton为此事的任何UI元素的宽度和高度,在不同的屏幕上每个独特的布局资源文件。有没有特别code你想获得有关的反馈?

It is entirely up to you if you want to change the layout width and height (in dp) of an imageButton. There is certainly nothing wrong with setting width and height of an imageButton or any UI element for that matter, in each unique layout resource file for various screens. Did you have specific code you wanted to get feedback about?

这篇关于正在修改的DP的大小,而不是推荐的各种屏幕尺寸的像素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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