【发布时间】:2013-06-09 13:31:28
【问题描述】:
我想将自定义背景应用到我的 ExpandableListView。 ExpandableListView 在slidingMenu 内。
这里是样式:
<style name="Widget.SlidingMenu.ExpandableListView" parent="android:Widget.ExpandableListView">
<item name="android:background">@drawable/sliding_menu_background</item>
<item name="android:cacheColorHint">@android:color/transparent</item>
<item name="android:divider">@drawable/menu_divider</item>
<item name="android:childDivider">@drawable/menu_divider</item>
<item name="android:dividerHeight">4px</item>
</style>
这是背景图片:
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/menu_noise"
android:tileMode="repeat"
android:dither="true"
/>
但问题是有时我的背景会像这样缩放和重复: https://dl.dropboxusercontent.com/u/6129677/bad_bg.JPG
有时一切都很好: https://dl.dropboxusercontent.com/u/6129677/good_bg.JPG
这里是应该重复的背景: https://dl.dropboxusercontent.com/u/6129677/menu_noise.png
我不明白这背后的问题是什么。 请给我一个线索。
【问题讨论】:
-
菜单噪音应该是单元格的背景
-
@blackbelt,为什么?如果列表没有填满整个区域怎么办?让它变黑? :)
标签: android android-layout android-listview expandablelistview