- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我们有两个 apk,我们想限制一个 apk 仅适用于手机,另一个仅适用于 Google Play 商店中的平板电脑。我们在 AndroidManifest.xml 文件中为此使用了“support-screen”属性,并在 google play 上使用高级模式上传了 apk。我们的平板电脑和手机设置如下:
电话:
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="false"
android:compatibleWidthLimitDp="320"/>
对于平板电脑:
<supports-screens android:smallScreens="false"
android:normalScreens="false"
android:largeScreens="true"
android:xlargeScreens="true"
android:requiresSmallestWidthDp="600" />
我们在实现这一点上取得了部分成功,但我们在使用 Sony Xperia D5322 等平板手机时遇到了问题。它应该显示支持 apk 的手机,但显示支持 apk 的平板电脑。
您能否建议我们正确的配置设置,以便支持 apk 的手机应该只出现在具有大屏幕和分辨率的手机和平板手机上,而支持 apk 的平板电脑应该只出现在所有类型的平板电脑上(即从 7 英寸平板电脑到 10.1 英寸) "平板电脑)。
注意:我们已经尝试使用以下设置的兼容屏幕选项,但我们没有得到我们想要的。所以我们决定只坚持使用支持屏幕选项。
手机:
<compatible-screens>
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
<!-- For devices like Nexus and Htc One-->
<screen android:screenSize="large" android:screenDensity="xhdpi" />
</compatible-screens>
对于平板电脑:
<compatible-screens>
<!-- For 7 & 8 inch Tablets -->
<screen android:screenSize="large" android:screenDensity="mdpi" />
<screen android:screenSize="large" android:screenDensity="hdpi" />
<!-- For 0 inch tablets -->
<screen android:screenSize="xlarge" android:screenDensity="ldpi" />
<screen android:screenSize="xlarge" android:screenDensity="mdpi" />
<screen android:screenSize="xlarge" android:screenDensity="hdpi" />
<screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
</compatible-screens>
最佳答案
不可能将不同的 APK 提供给不同的设备尺寸,但是可以有一个 APK 并检测屏幕尺寸,然后相应地进行调整。查看this website或 this website有关调整屏幕尺寸的更多信息。
尝试在您的布局中使用 wrap_content
和 match_parent
变量,它们应该根据安装应用的设备的比例调整应用。
希望这对您有所帮助!
关于android - 如何使用 google play 商店上的多个 apk 支持将 apk 限制在手机和平板电脑上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36520678/
我们将 Azure Boards(与敏捷流程相关的项目)定义为“功能”>“史诗”>“任务”>“用户故事”。 在我们的Azure Boards(Boards >Board)中,它仅显示Epic和Feat
我正在编写一个 C++ 井字游戏,这是我目前拥有的: #include using namespace std; int main() { board *b; b->draw();
这是一个足够简单的问题。 看完documentation for ion-pane它指出: A simple container that fits content, with no side eff
关闭。这个问题是opinion-based .它目前不接受答案。 想改进这个问题?更新问题,以便 editing this post 可以用事实和引用来回答它. 4年前关闭。 Improve this
我正在用 javascript 对 arduino 开发板进行编程。我正在尝试使用 johnny-five 库连接多个 arduino 板。我关注了johnny-five documentation我
在我的 Java 类(class)中,我们正在学习《Java 基础知识》一书的第 4 章。我正在做项目 4-11,它是一个黑色和红色的棋盘格,但是我得到随机颜色,我试图按照本书教我们使用 ColorP
我正在制作一个数独板 GUI,它应该看起来像这样 http://www.sudoku.4thewww.com/Grids/grid.jpg 由于某种原因,它只显示最后一个 3*3 板。如果有人能告诉我
我正在开发一款带有二维阵列(游戏板)的新游戏。每个单元格/图 block 都有一定数量的点。 我想实现的是一个算法能找到核心最高的最短路径。 所以我首先实现了 Dijkstra 算法(下面的源代码)来
更新:(2015-10-16)[已解决!]-使用trigger()并通过slice()限制为50个引脚固定。 非常感谢Abhas Tandon通过提供使用 $(this).trigger('click
关闭。这个问题需要更多focused .它目前不接受答案。 想改善这个问题吗?更新问题,使其仅关注一个问题 editing this post . 7年前关闭。 Improve this questi
var size = 8; var board = ""; for (var y = 0; y x= (x+y) % 2 = 关于javasc
我正在制作一个简单的游戏,需要我创建一个由用户定义大小的棋盘。 我一直在编写一个函数,该函数应该返回我将在我的游戏中使用的棋盘(矩阵),但我似乎无法让它工作。 我尝试使用嵌套的 for 循环方法在 m
我正在尝试让板模板引擎与 express.js 一起工作。我最初的尝试是这样的: app.register('.html', { compile: function (str, options
我正在测试 Azure Boards Rest API。我目前可以成功创建、删除和获取项目,但我似乎无法在列之间移动它们。 这是我的要求https://{{AzureBoardsToken}}@{{A
我想用 trello api 归档一个板/列表,但我找不到解决方案。 与 https://trello.com/docs/api/list/#post-1-lists-idlist-archiveal
我上传了 sketch到一个 Arduino Uno,它的循环是这样的: void loop(){ Serial.println("Hello, World!"); } 所以,现在,我无法再上
我想要进行一个查询,显示结构 Epic -> 功能 -> 发布 -> 用户故事 -> 任务,以及特定迭代路径下的所有待处理任务 我尝试使用工作项树,但它只显示到 mu 用户故事 我的 Azure De
我在 python 中使用来自 Opencv 的 Charuco 标记。我之前使用的是 Aruco 开发板,我可以选择创建一个带有 id 偏移量(例如:偏移量为 40)的开发板。 from cv2 i
我不知道如何将另一个 View 中的辅助 Anchorpane 设置到主 View 的边界(在 fxml 代码中,它将是名为 holderPane 并且有灰色区域),这样当窗口展开时,它也会随之拉伸(
如何使用包含列、行和堆栈(包含 4、3、2、1)的 3D 通用数组制作一 block 板。 这是我声明的: private int row, col, stack; int[][][] array3D
我是一名优秀的程序员,十分优秀!