1

In my eclipse, when ever I have a scrollView and a background image set up at the same time, my background image stretches vertically. I would like it not to stretch but repeat all the way down the ScrollView.

Please help

user2005921
  • 39
  • 3
  • 6

1 Answers1

0

Create a XML file within the drawable:

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

than you can use this file as your drawable, and it will be repeated

Note that there is a bug related to repeat (android 3.0 and bellow), when used in a listview see XML drawable Bitmap tileMode bug?

Community
  • 1
  • 1
Kirill Kulakov
  • 10,035
  • 9
  • 50
  • 67