android - 在 Android 中支持多屏幕

标签 android android-layout screen

我的问题是我无法想出如何在 Android 中支持多屏幕。我已经阅读了很多次 android 文档以及许多博客和文章:

  1. http://developer.android.com/guide/practices/screens_support.html
  2. http://mobile.tutsplus.com/tutorials/mobile-design-tutorials/how-to-get-started-in-android-app-design/
  3. http://www.androidhive.info/

但我什至无法决定如何制作适合大多数屏幕的背景图片

  • 正常
  • 超大

dentry :

  • ldpi
  • 平均发展指数
  • 分辨率
  • xdpi

最佳答案

首先,不推荐使用全屏图像作为背景,因为它可能会导致内存问题。即使有人需要使用全屏图像作为背景,也可以通过以下方式对其进行缩放:

  • 使用支持的最大尺寸的图片
  • 将其保持在中心并在其周围添加彩色/渐变边框
  • 可以将其拉伸(stretch)到全屏(不会保持纵横比)

如需深入讨论,请阅读:

http://vinsol.com/blog/2014/11/20/tips-for-designers-from-a-developer/

关于android - 在 Android 中支持多屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16059427/

相关文章:

java - 获取 DatePickerDialog 的取消按钮引用

java - 如何让 ImageView 缩放以在宽度允许的范围内尽可能多地填充布局

c# - 无需使用 API 或 WMI 即可获取监视器显示名称?

javascript - 屏幕尺寸检测后的冷融合

Android:如何组织布局

html - 如何根据屏幕尺寸缩放 div 中的背景图像

java - 在我自己的 Android 应用程序中嵌入 openVpn 客户端

android - 将 HTML5 网页封装到 Android 应用程序中的最简单方法?

android - 通知 - 在 Lollipop Android 版本之前设置大图标

android - 如果 fill_parent 已过期,为什么 "android create project"会给出一个带有 fill_parent 而不是 match_parent 的 main.xml?