我有以下问题.我有一个GridView内部LinearLayout如下图所示.我想在用户点击GridView图像中的空白区域时检测点击事件,我想要的位置是红色区域,也是绿色区域内.
但我有以下问题.
onClickListener为GridView:错误,因为适配器不能添加Click事件.onItemClickListener了GridView:我只是可以检测存在的项目(在图像中的白框)onClickListener,LinearLayout我只能检测绿色区域上的点击事件,而不是红色区域.那么我该如何解决上述问题呢.
@Edit:我的布局看起来像:
<LinearLayout>
<GridView
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
谢谢 :)

android ×1