我可以做一个ListView项不可选?做一个、可选、ListView

由网友(就算醉又怎样)分享简介:我采取无休止的ListView(像Twitter的应用程序)。我想打的最后一个项目不selecteble。因此,如果倒数第二个项目被选中,我向下滚动我的轨迹球,没有任何反应。我尝试设置机器人:可调焦=假和android:cickable =假,但我没有看到任何chnage I am implementing an e...

我采取无休止的ListView(像Twitter的应用程序)。我想打的最后一个项目不selecteble。因此,如果倒数第二个项目被选中,我向下滚动我的轨迹球,没有任何反应。我尝试设置机器人:可调焦=假和android:cickable =假,但我没有看到任何chnage

I am implementing an endless ListView (like in the Twitter app). I want to make the last item not selecteble. So that if the penultimate item is selected and I scroll down with my trackball, nothing happens. I tried setting android:focusable="false" and android:cickable="false" but I didn't notice any chnage.

推荐答案

这是pretty的方便,在您的适配器可以覆盖方法的IsEnabled(INT位置)并返回false为这个项目。

It's pretty easy, in your adapter you can override the method isEnabled(int position) and return false for this item.

阅读全文

相关推荐

最新文章