如何创建与2单元之间的利润率的Android定制的ListView? [英] How to create custom listview for android with margins between 2 elements?
问题描述
我需要创建一个列表视图活动的应用程序,但在列表中的元素应该分开从另一个,并有更多然后点击选项:
I need to create an application with a list-view activity, but the elements in the list should be separated one from another and have more then one click option:
下面是图像:
这样我就可以点击在任务看任务的详细信息,我可以点击任务(有颜色的部分)来改变它的颜色,左侧这种方式来改变它的优先级
so i can click on the on the task to see the task details and i can click on the left side of the task (the colored part) to change it's color, and this way to change it's priority
我真的AP preciate如果有一个人能为我提供的教程或附加读取信息来创建这样的自定义列表。
i would really appreciate if some one could provide me with a tutorial or additional reading information to creating such custom lists.
推荐答案
分
和 dividerHeight
ListView控件的属性可以让你的列表视图项目之间的空间:
divider
and dividerHeight
property of the ListView can make space between your listview items:
<ListView android:id="@+id/list_view"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:divider="@android:color/transparent"
android:dividerHeight="10.0sp"/>
您可以找到关于如何使用的多个可点击区域
You can find some tutorial on how to build an Android Listview with Multiple Clickable Zones
这篇关于如何创建与2单元之间的利润率的Android定制的ListView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!