【问题标题】:Disable listview alphabetic index by default默认禁用listview字母索引
【发布时间】:2015-08-24 05:28:07
【问题描述】:

我对特定设备中的列表视图有疑问。它在如下所示的 Karbonn 手机屏幕右侧显示字母索引。

这是我的列表视图.....

<ListView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:drawSelectorOnTop="true"
    android:dividerHeight="0dp"
    android:focusable="false"
    android:scrollbars="none"
    android:clickable="false"
    android:listSelector="@android:color/transparent"
    android:cacheColorHint="@android:color/transparent"
    android:divider="@null" />

【问题讨论】:

  • 你在使用默认的 ListView 吗?
  • 是的,它是默认的 ListView。

标签: android listview alphabetical


【解决方案1】:
listView.setFastScrollEnabled(false)

参考link

【讨论】:

  • 问题仍未解决,它会显示,并且一旦我点击应用程序就会崩溃。
【解决方案2】:

添加你的 xml

 android:fastScrollEnabled="false"

喜欢

<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"
android:dividerHeight="0dp"
android:focusable="false"
android:scrollbars="none"
android:clickable="false"
android:fastScrollEnabled="false"
android:listSelector="@android:color/transparent"
android:cacheColorHint="@android:color/transparent"
android:divider="@null" />

【讨论】:

  • 问题仍然没有解决,它显示并且一旦我点击应用程序就崩溃了。
猜你喜欢
  • 2019-05-30
  • 1970-01-01
  • 1970-01-01
  • 2017-06-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-11-05
相关资源
最近更新 更多