1

Having designed an interface for HDPI in Fireworks (480x800) and now moving it over ready for an MDPI version (320x480) i've come across an issue

Proportionally, the HDPI screen is slightly taller than the MDPI screen.

I know my images will resize, but even still am losing some space height wise

Evyerthing fits on screen beautifully on HDPI version....but now its resized down to MDPI the smaller proportion in height means i'm more stuck for space.

How does one avoid this issue?

I asked the developer if the space between elements can be altered for the MDPI version (eg, on a screen with 8 text fields.... the space between the fields is shortened), he said it will work on percentage of the screen etc.....that's all ok...problem is that

A 480x800 screen -- if this is downsized (proportionally width and height) to a width of 320, the height ends up as 533, not 480.

Therefore i lose 53 pixels in height.

Have I got confused? How do i sort this out? Much thanks

4

3 回答 3

2

首先

从比例上看,HDPI 屏幕比 MDPI 屏幕略高。

你不能说它是否更高。密度定义分辨率。

Evyerthing 在 HDPI 版本上非常适合屏幕......但现在它的大小调整为 MDPI,高度的比例更小意味着我更受空间限制。

所以,正如我所说 - MDPI 也不意味着您的屏幕分辨率低于 HDPI 屏幕分辨率。例如,我有一台 1280x800 分辨率和 MDPI 屏幕的平板电脑。得到它?

看起来最好为不同尺寸的设备(小型、中型、大型、xlarge)提供不同的布局。

于 2012-07-11T09:49:02.957 回答
0

它更好地使用布局权重,并确保在用 xml 设计 ui 时在任何地方都使用 desipixel dp 而不是 px。在设计 ui 时练习的最佳方法是确保应用程序能够正常工作并且看起来很好,而不考虑屏幕尺寸

有关布局重量的更多信息,请查看此链接

于 2012-07-11T10:01:38.597 回答
-1

使用ScrollView。但是,我不建议为固定屏幕尺寸甚至固定比例设计布局。

于 2012-07-11T09:49:49.477 回答