Android Layout设计原则

标签 android android-layout google-play android-manifest android-screen-support

<分区>

我一直在研究为不同的屏幕尺寸、屏幕密度和方向设计布局的最佳方法,但我越来越困惑。

<强>1。设计密度与屏幕尺寸
我读过这个link

现在在为 Gingerbread 设计时应该考虑什么。每个文件夹中的布局显示 LDPI、HDPI 和 MDPI。但这会增加整个应用程序的大小。

现在我已经停止考虑 LDPI。但现在我们还有 XHDPI 和 XXHDPI。 那么,我们如何着手设计所有页面,同时保持合理的大小呢?

屏幕尺寸、密度或分辨率应该优先考虑什么?

对于图像 9-patch images 可以使用。 创建它们的最佳工具是什么?

2.风景与肖像。

现在在这个布局方程式中,如果我们为屏幕方向包含不同的布局,应用程序会变得更大,工作也会变得乏味。

创建较小的 xml 并将它们包括在内是一个很好的解决方案,但即便如此,考虑到所有不同的类型,它仍然变得乏味。特别适用于 Android 4 及更高版本,每个 fragment 具有不同的布局,

我的问题是——考虑到以上所有因素,设计布局的最佳和最有效的方法是什么。

最佳答案

您可以尝试以下链接: 问题似乎很广泛。但你可以阅读这个。

  1. Welcome to Android Design ,

  2. Is there a standard layout for an Android app or should I design mine from first principles? ,

  3. 10 Tips For Android UI Design ,

对于 9-patch 图片你可以看我的这篇文章。

  1. Utility of android nine patch

  2. Education Guidelines

为了支持多设备布局,

请通过Supporting Multiple Screens这个链接:

对于multpal布局组件

res/layout/my_layout.xml             // normal screen size ("default")
res/layout-small/my_layout.xml       // small screen size
res/layout-large/my_layout.xml       // large screen size
res/layout-xlarge/my_layout.xml      // Hd tablet

方向。

        res/layout/              # default (portrait)
            main.xml
        res/layout-land/         # landscape
            main.xml
        res/layout-large/        # large (portrait)
            main.xml
        res/layout-large-land/   # large landscape
            main.xml


1. You can also use `qualifier` for having multipal resource. 

关于Android Layout设计原则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24030020/

相关文章:

android - 在Google Play上按关键字检查应用安装

android - ServiceTestCase 空指针中的 MockContentResolver

android - 在android中使用陀螺仪获取角度

c# - 异步/等待不工作 "string does not contain a defination fot GetAwaiter "并且没有扩展名

android - 如何重组布局以使其更好?

android - 是什么导致此 Android APK 上传错误 : "Non-upgradable APK"

android - 在 Android 应用程序上捐款

Android,setVisbility 在 RelativeLayout 中不起作用

android - 安卓梯度生成器

android - 从 Google Play 取消发布应用后,应用内订阅会发生什么情况?