如何使每一个项目的分部分列表视图中的android?视图、部分、项目、列表

2023-09-06 04:05:14 作者:吹一样的风

我想改变的分隔高度动态。无论从什么我已搜查似乎有可能通过的ListView 设置分隔每个项目的一部分。但我不是很清楚这一点。

I wanted to change the divider height dynamically. From whatever I have searched it seems that it is possible through setting divider as part of each item in ListView. But I am not very clear with this.

所以,有人可以更具体为一体如何使分作为项目的 ListView的一部分

So, can someone be more specific as how can one make the divider as part of item in ListView?

推荐答案

办法做到这将是包括分隔每行的底部。现在,你必须设置你的 getView 方法在listadapter根据该项目,你都出现的时刻。

A way to do this would be to include the divider at the bottom of each row. Now you have to set the height of the divider view in your getView method in your listadapter depending of the item you are showing at the moment.