문제

I have a little tweak in my application: my Listview is placed between 2 LinearLayout that looks like my ListView rows.

That's a little trick that allows me to always display first and last item

and my layout looks like

[LinearLayout]

[ListView]

[LinearLayout]

I am pretty happy with the result except for one thing: I would like to insert the listview divider between those LinearLayouts and the ListView.

How should I get a drawable (or better, a xml layout) that would looks exactly like the divider?

도움이 되었습니까?

해결책

You can use ListView.getDivider() to get the drawable used by a list view according to Android SDK version and theme.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top