【问题标题】:Getting orange highlight color in the padding space of gridView on click单击时在gridView的填充空间中获取橙色突出显示颜色
【发布时间】:2011-07-01 18:27:33
【问题描述】:

当我按下 GridView 时,我会在 GridView 中获得橙色高亮颜色。因为我已经指定了填充,这个高亮显示在那个区域。

有人可以帮我知道,如何避免它?

我已经为 GridView 使用了 OnKeyDown 事件,但没有调用该事件。因此,适配器为没有填充的区域提供图像。

【问题讨论】:

    标签: android android-layout


    【解决方案1】:

    想添加一个非链接答案:

    xml中为gridView添加如下属性

    android:listSelector="@android:color/transparent"
    

    这将使gridView 的选定状态颜色透明,并且实际上会移除橙色突出显示。

    【讨论】:

      猜你喜欢
      • 2012-11-09
      • 1970-01-01
      • 2014-11-06
      • 1970-01-01
      • 1970-01-01
      • 2021-10-04
      • 1970-01-01
      • 2013-09-07
      • 2012-03-27
      相关资源
      最近更新 更多