2009-11-09 4 views

Antwort

152

Here ist eine wirklich schöne Erklärung:

Setzen Sie Ihre "back.png" Bild auf "ziehbar" -Ordner. Dann erstellen Sie eine ziehbar "backrepeat.xml" wie folgt aus:

<?xml version="1.0" encoding="utf-8"?> 
<bitmap xmlns:android="http://schemas.android.com/apk/res/android" 
    android:src="@drawable/back" 
    android:tileMode="repeat" /> 

In Ihrem Layout, fügen android:background="@drawable/backrepeat":

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
    android:id="@+id/MainLayout" 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" 
    android:background="@drawable/backrepeat"> 

</LinearLayout> 

Wie bei vielen Android bewährten Verfahren/Tricks handlich ist, kann sie zurückverfolgt werden zurück zu Romain Guy.

+4

Dieser Typ ist verdammt produktiv. Go Romain Guy !!! –

+0

es funktioniert in Gerät nicht Eklipse – mehmet

+0

Whooooooow nette Antwort! Genau das, was ich brauchte! – alap

Verwandte Themen