Ok, đây là những gì tôi có trong ứng dụng của mình. Nó bao gồm một hack để ngăn chặn ListView
s từ đi màu đen trong khi di chuyển.
drawable/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" />
giá trị/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">
//
Hãy thử với điều này quá: android: trọng lực = "clip_horizontal" --- nó tránh hình ảnh biến dạng –
Tôi đã thử điều này, nhưng chỉ thấy ngói đơn kéo dài tới tất cả các màn hình :( –
Nếu tôi có một 'ScrollView' và đặt nền để lặp lại trên đó và tôi có một danh sách dài, tôi sẽ không gặp vấn đề gì với ngoại lệ OutOfMemory khi' ScrollView' trở nên rất dài? – AndreiBogdan