Skip to content

Conversation

@dhanuarf
Copy link
Contributor

@dhanuarf dhanuarf commented Jul 2, 2025

This PR fixes activation view filling the whole screen when device's orientation changes to horizontal. The culprit behind this was in ActivationIndicatorHelper.calculateActivationIndicatorSize(). The if(!result.intersect(availableRect)) always returned false, causing calculateActivationIndicatorSize() returns with availableRect instead of the result rect. This caused it to fill the whole screen.

And the reason it was always intersecting was that the Height slider setting's maxValue was set to a fixed heightDpi.toInt(). And this heightDpi.toInt() was fetched during previous device's orientation, which is in most cases in vertical mode. And when the orientation changes this height value can intersect with the newly calculated size in calculateIndicatorSize().

The PR also includes:

  • Prevent activation view conflicting with android's back gesture starting Android 10
  • Add option to display hint in the activation area

	* Fixed activation view filling the whole screen on horizontal orientation with slightly modified `calculateActivationIndicatorSize`. Instead of using dip
	  it is now using percentage so that the height in vertical orientation is proportional to the horizontal orientation height
	* Added `system gesture exclusion rects` to prevent conflicting with android's back gesture starting Android 10
	* Added option to display hint on the activation area
@dhanuarf dhanuarf closed this Jul 2, 2025
@dhanuarf dhanuarf deleted the fix branch July 2, 2025 03:54
@dhanuarf dhanuarf changed the title Changes: Changes: fix activation view filling the whole screen in horizontal orientation and some others... Jul 2, 2025
@dhanuarf
Copy link
Contributor Author

dhanuarf commented Jul 2, 2025

Oops, was trying to fix some codes and rebase the branch ended up closing this PR. Sorry, my first time using PR.

Can I open another PR?

@devmil
Copy link
Owner

devmil commented Jul 2, 2025

Sure! Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants