我有LinearLayout,我有PNG,我用作瓷砖 - 但我也想它背后的颜色将是白色。添加PNG和颜色到背景
这可能吗?
我的代码是:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/LinearMain" android:background="@drawable/bcktiles">
和绘制是:
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/bgsite" android:tileMode="repeat">
</bitmap>
我不知道往哪里放#FFF
感谢
这是一个不错的选择,只是要注意[消失的填充值](http://stackoverflow.com/questions/6104677/transitiondrawable-doesnt-account-for-padding/6105149#6105149)。 – dmon 2011-06-08 20:26:00
我已经在日食预览屏幕上很好,但是当在XOOM上看到我只看到白色! – Himberjack 2011-06-08 20:29:34
您可能会被此错误咬住:http://code.google.com/p/android/issues/detail?id=15340 – 2011-06-08 20:43:11