好的,这是我的应用程序。它包括一个黑客,以防止滚动时ListView
变黑。
抽拉/ app_background.xml:
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/actual_pattern_image"
android:tileMode="repeat" />
值/ styles.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="app_theme" parent="android:Theme">
<item name="android:windowBackground">@drawable/app_background</item>
<item name="android:listViewStyle">@style/TransparentListView</item>
<item name="android:expandableListViewStyle">@style/TransparentExpandableListView</item>
</style>
<style name="TransparentListView" parent="@android:style/Widget.ListView">
<item name="android:cacheColorHint">@android:color/transparent</item>
</style>
<style name="TransparentExpandableListView" parent="@android:style/Widget.ExpandableListView">
<item name="android:cacheColorHint">@android:color/transparent</item>
</style>
</resources>
的AndroidManifest.xml:
//
<application android:theme="@style/app_theme">
//
尝试用这种过于:机器人:重力=“clip_horizontal” ---它避免图像变形 – 2011-09-30 21:37:02
我已经试过这一点,但看到的只是单一的瓷砖延伸到所有的屏幕:( – 2012-03-02 19:24:17
如果我有一个'ScrollView'并放置一个背景重复,并且我有一个很长的列表,当'ScrollView'变得很长时,我不会遇到OutOfMemory异常的问题吗? – AndreiBogdan 2012-08-31 09:40:17