分消失在ListView控件时ArrayAdapter.isEnabled返回false [英] Disappearing divider in ListView when ArrayAdapter.isEnabled returns false

查看:904
本文介绍了分消失在ListView控件时ArrayAdapter.isEnabled返回false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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