如何使每一个项目的分部分列表视图中的android? [英] How to make divider part of each item in listview in android?

查看:80
本文介绍了如何使每一个项目的分部分列表视图中的android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想改变的分隔高度动态。无论从什么我已搜查似乎有可能通过的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?

推荐答案

办法做到这将是包括分隔每行的底部。现在,你必须设置你的<一个分频器视图的高度href="http://developer.android.com/reference/android/widget/Adapter.html#getView%28int,%20android.view.View,%20android.view.ViewGroup%29"相对=nofollow> 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.

这篇关于如何使每一个项目的分部分列表视图中的android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆