【问题标题】:Drawable with bitmap element showing on phone, but not tablet可绘制位图元素显示在手机上,但不是平板电脑
【发布时间】:2013-11-11 11:18:24
【问题描述】:

我在res/drawable-hdpidrawable-xhdpi 中创建了一个bg.xml,其中包含以下元素:

<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/mainbg"
    android:tileMode="repeat"
    android:dither="true" />

这在我的三星 S3 上运行良好。但是在我的 Nexus 7 (v2) 上,背景没有出现。 src 文件被添加到 xhpdi 文件夹中,所以它就在那里。 还加了

   < supports-screens android:xlargeScreens="true">

可能是什么问题?

【问题讨论】:

  • 创建名为 drawable-sw720dp 或 drawable-sw600dp 的新文件夹并将图像放入该文件夹并尝试一次...

标签: android bitmap drawable


【解决方案1】:

没关系 - xml 文件有差异,这就是原因。愚蠢的。感谢您的帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-13
    • 1970-01-01
    • 2018-05-10
    • 2016-01-20
    相关资源
    最近更新 更多