mahdi yamani
mahdi yamani

Reputation: 933

android -How to make background like this

I need to make background like this for each row on my listview .

enter image description here

Is there anyway to do it without using background images ? I mean is there anyway to make this by just using xml drawables ?

thanks

Upvotes: 1

Views: 65

Answers (1)

IshRoid
IshRoid

Reputation: 3735

You need to create a repeatable Bitmap and set it to your layout as a background.

Use this image enter image description here (You can edit image if you want to change color etc , if you need psd file i can share)

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

in your layout set

android:background="@drawable/backrepeat"

Final output would be

Upvotes: 1

Related Questions