ListView中长按动画 [英] ListView Long Click Animation

查看:241
本文介绍了ListView中长按动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想捕捉在ListView,这是很容易做到用OnItemLongClickListener长按事件。然而,缺乏选择过渡到当长按是由onCreateContextMenu处理所见过长preSS的衰落动画。使用我如何可以做到这一点的动画 OnItemLongClickListener

I would like to capture long click events in a ListView, which was easily done using a OnItemLongClickListener. However, that lacks the fading animation of the selector transitioning to a long press that is seen when the long click is handled by onCreateContextMenu. How can I get that animation using OnItemLongClickListener?

推荐答案

我有同样的问题,并解决它的删除以下的LinearLayout中属性我行:

I was having the same problem and resolved it by removing the following property in the LinearLayout for my rows:

android:clickable="true"

删除该属性或将其值设置为false,既解决了这一问题。

Removing that property or setting the value to false both fixed the problem.

这篇关于ListView中长按动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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