This repository was archived by the owner on Jun 9, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pull to collapse in split screen
`MotionEvent.getRawX/Y` methods always return screen coordinates meaning that they are calculated from the top left corner of the device screen. This works incorrectly for when the application is located in the bottom/right split space of the device. The reason for that is the difference in code which checks whether the touched point lies inside of a view (`me.saked.dank.utils.touchLiesOn`). It deals with coordinates that are calculated from top left corner of the **application** area and not the **screen** area. The fix is to use `MotionEvent.getX/Y` which return local coordinates that later can be correctly located in view rectangles.
- Loading branch information
3f1500e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very useful. I did not know this. I'll add this fix to InboxRecyclerView.