react-native-menu / menu

UIMenu Component for React Native
MIT License
998 stars 59 forks source link

fix(android): hit slop functionality #942

Closed batuhanoztrk closed 4 weeks ago

batuhanoztrk commented 1 month ago

Add Hit Slop Support for MenuView on Android

This PR adds support for hit slop on the MenuView component for Android, improving touch responsiveness and user experience.

Changes

MenuView.kt

Testing

Please test the following scenarios:

  1. Menu opens correctly with default touch area
  2. Menu opens correctly when hit slop is applied
  3. Hit slop works as expected for all sides (left, top, right, bottom)
  4. Touch delegate updates properly when view size changes or when attached to window

Notes

This implementation enhances the touch area of the MenuView component, making it easier for users to interact with the menu, especially on smaller devices or for users with accessibility needs.