触摸一个无形的观点后面的按钮 [英] Touch a button behind an invisible view

查看:153
本文介绍了触摸一个无形的观点后面的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看图片,我有一个按钮,它是一种无形的视图(红线)的后面,可以说一个gridview,或者只是简单地的LinearLayout 。是否有任何可能的方式,让我触摸或点击这个无形的观点背后的按钮?谢谢。

注意:我有我的原因,我需要的认为后面的按钮,我只是说明它使用此图片为你们知道我的意思。该按钮有背后的观点:))


解决方案

 机器人:可聚焦=假
机器人:focusableInTouchMode =假
机器人:可点击=假

声明它在你的布局。

让我知道,如果它可以帮助你。

See the picture, i have a button and it is behind an invisible view (the red line), lets say a gridview, or just simply LinearLayout. Is there any possible way that will let me touch or click the button behind this invisible view? Thank you.

NOTE : i have my reason why i need the button behind the view, i just illustrated it using this picture for you guys to know what i meant. The button has to behind the view :))

解决方案

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

Declare it in your layout.

Let me know if it helps you.

这篇关于触摸一个无形的观点后面的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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