문제

I am using custom row view in ListView widget.

I am having getView method in my implementation.

What I want is that I want to hide divider image of 2nd row how can I do it?

도움이 되었습니까?

해결책

If you're talking about the image that displays when you call setDivider, or android:divider in XML, I don't think you can hide it on some rows and show it on other rows.

Instead, you can create a PNG (probably with draw9patch) with a border on the top or the bottom, and in your ListAdapter.getView() set it as the background on whatever rows you want. On the other rows, you can set a background that has no border. This will give the appearance that some rows have a divider, and others don't.

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