开发者

Android Listview ArrayAdapter example

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 divi开发者_JAVA百科der 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜