java - 支持多种布局的屏幕 list

标签 java android compatibility android-studio-3.0

我找到了this但我不清楚的是; 当有很多带有 fragment 的布局时,如何添加

/res/layout/layout.xml         // Default layout
 /res/layout-small/layout.xml   // Small screens
 /res/layout-large/layout.xml   // Large screens
 /res/layout-xlarge/layout.xml  // Ex

/res/layout-small-land/layout.xml      // Small screens, landscape view
 /res/layout-small-portrait/layout.xml  // Small screens, portrait view

要使应用程序兼容任何屏幕尺寸?另外,对于一个 UI 来说,是否需要设计所需 View x6(布局、小、大、超大、小陆地、小肖像) 倍的屏幕尺寸?

最佳答案

You can check this :

res/layout/main_activity.xml                # For handsets
res/layout-land/main_activity.xml           # For handsets in landscape
res/layout-sw600dp/main_activity.xml        # For 7” tablets
res/layout-sw600dp-land/main_activity.xml   # For 7” tablets in landscape

关于java - 支持多种布局的屏幕 list ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58152184/

相关文章:

android - Android SDK无法加载处理

java - 如何在Android上防止键盘推送webview

android - 返回列子集的房间查询错误

html - 3列表作为DIV

python 2.7 与 python 3.1

java - Android java-grpc 客户端到 python-grpc 服务器

java - 谁能推荐现成的 ACL Java 库?

android - 跨安卓版本的 openOptionsMenu()

java - 不知道如何迭代 <forEach> 中提供的 "items"

java - SONAR 问题 "main"不应该是 "throw"任何 JAVA 7