问题描述
我用 ListActivity
用我自己的 ArrayAdapter
类。当我重写方法 ArrayAdapter.areAllItemsEnabled()
和 ArrayAdapter.isEnabled()
列表中的某些单元格之间的分隔查看消失。有谁知道如何避免这种情况?我需要的分隔,甚至为残疾单元格显示。
I'm using ListActivity
with my own ArrayAdapter
class. When I override the methods ArrayAdapter.areAllItemsEnabled()
and ArrayAdapter.isEnabled()
the divider between some cells in the list view disappear. Does anyone know how to avoid this? I need the dividers to display even for disabled cells.
推荐答案
有关具体项目回报areAllItemsEnabled真()和虚假的IsEnabled的。禁用的项目不会成为可点击的,但你仍然可以查看分隔线
Return true in areAllItemsEnabled() and false in isEnabled for specific item. The disabled item wont be clickable but you will still be able to view the divider lines
请注意:这并不适用于Android 5个工作
Note: This doesn't work for Android 5
这篇关于分消失在ListView控件时ArrayAdapter.isEnabled返回false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!