如何禁用操作栏菜单项目的庆龙preSS事件? [英] How to disable the Long-Press event of Action Bar menu Item?

查看:103
本文介绍了如何禁用操作栏菜单项目的庆龙preSS事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android中,我已经创建了一个操作栏,并添加几个菜单项吧。当我点击菜单项,我在执行某些操作。

In Android, I Have created an action bar and added few menus item to it. When I click menu items, I am performing some action.

在长按我找到一个空的敬酒消息。我的问题是如何禁用长按敬酒?

On long click I find a empty toast message. My Question is how to disable the toast on long click?

推荐答案

而不是试图禁用像烤面包的看法空,您可以添加的机器人:标题属性来描述什么是行动真正做到

Instead trying to disable the empty "toast like" view, you may add the "android:title" attribute to describe what's the action actually do.

例如:

    <item android:id="@+id/action_websearch"
      android:icon="@drawable/action_search"
      android:title="@string/action_websearch"
      android:showAsAction="ifRoom|withText" />

这篇关于如何禁用操作栏菜单项目的庆龙preSS事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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