user1752973
user1752973

Reputation: 127

Android listview with custom layout header and footer

Sory I can't describe a right title for my question,

I want to create listview something like this

enter image description here

In top of list view on screen look like

enter image description here

and when user scroll the list in screen will be like this

enter image description here

and in end of list is

enter image description here

I have 3 picture for top list, middle and bottom list. I already try to add header and footer for top image and bottom image but looks like the picture is inside the list view

I try to create vertical linear layout and put picture top,middle and bottom in sequence but still not get result that i expected

Do anyone have a suggestion for listview like this

Upvotes: 0

Views: 207

Answers (1)

abbas.aniefa
abbas.aniefa

Reputation: 2905

Don't set your frame background for entire listview or its parent. Instead first slice your frame background into three parts, (i) topframe (ii) middleframe (iii) bottomframe. Now create a custom listview and set background for each and every list rows.

In order to achieve your design, you need to find the first and last item of list and set topframe for first row and bottomframe for last row , all the other rows background should be middleframe.

Upvotes: 0

Related Questions