Is there an example of how to use a TouchDelegate in Android to increase the size of a view's click target?

后端 未结 11 569
误落风尘
误落风尘 2020-11-28 19:01

My understanding is that when you have a view that\'s too small to easily touch, you\'re supposed to use a TouchDelegate to increase the clickable region for that view.

11条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 19:24

    In most cases, you can wrap the view that requires a larger touch area in another headless view (artificial transparent view) and add padding/margin to the wrapper view and attach the click/touch even to the wrapper view instead of the original view that has to have a larger touch area.

提交回复
热议问题