Android Listview ArrayAdapter example
Question
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?
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow