安卓:禁用亮点上的ListView点击 [英] Android: disabling highlight on listView click

查看:139
本文介绍了安卓:禁用亮点上的ListView点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要禁用触摸一个ListView一行时出现橙色亮点。到目前为止,在我的XML我已经尝试了以下内容:

I want to disable the orange highlight that occurs when touching a listView row. So far in my xml I have tried the following:

android:focusable="false"
android:focusableInTouchMode="false"
android:clickable="false"

更多信息:我想那里是零差价,当用户触摸屏幕此ListView的对象

More information: I want there to be zero difference when a user touches the screen on this listView object.

推荐答案

橙色高亮效果是风格中的ListView控件。 本文提供了如何很好的概述重写ListView的风格。

The orange highlight effect is a style on the ListView. This article gives a good overview of how to override the listView style.

实质上,你有一个选择器,用于指定基于当前状态不同的风格元素。

Essentially, you have a selector that specifies different style elements based on the current state.

看到这样的短期和快速的解决方案 http://stackoverflow.com/a/12242564/185022

see this for short and quick solution http://stackoverflow.com/a/12242564/185022

这篇关于安卓:禁用亮点上的ListView点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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