开发者

android detecting touch event in a layout with many children

开发者 https://www.devze.com 2023-03-26 09:25 出处:网络
I have a linearlayout with a header view followed by a listview and another view (say view A) below the list. I want to toggle the visibility if View A when either the header or the list is touched. F

I have a linearlayout with a header view followed by a listview and another view (say view A) below the list. I want to toggle the visibility if View A when either the header or the list is touched. For this I had set an onTouchListener on the linearLayout but the on touch method doesnot se开发者_运维问答em to be called


You most likely want to have an overriding onTouchEvent(MotionEvent) method in your activity.

0

精彩评论

暂无评论...
验证码 换一张
取 消