Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finger tracking in form #3384

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ThomasH99
Copy link
Contributor

Added support for super-imposing images below the pointer (fingers). I cannot test it on the device (can't build for device with locally modified sources) so I hope you'll review the code before accepting.

@shai-almog
Copy link
Collaborator

Thanks!

This code won't compile on our servers since it uses Java 8 lambda syntax. The code should be limited to Java 5 syntax for core code.

I would also refactor this so the glass pane is a separate class and the API should only be exposed on that class. So we'd have a new class "PointerTracker" through which this API will be installed. It can be in the same package and use package friendly APIs into Form but that way we'd keep the API changes segregated and clear. Does that make sense?

@ThomasH99
Copy link
Contributor Author

Thanks for looking at this, but not sure I get how you want the code structure. Can you point to an example I could use for inspiration?

@shai-almog
Copy link
Collaborator

I'm not sure if there's something similar in the code I can point you to. My goal is to keep the impact on Form.java to a minimum and ideally make it unaware of most of this change. The logic behind this is two fold:

  • Easier to change later on and extend
  • Smaller API in the core for functionality that isn't critical

To do that you can introduce a new class e.g. PointerHighlightGlassPane. It would include some of the code from setPointerTracking and most of the other code/APIs. It would essentially install itself on a Form instead of invoking an API on Form you would invoke it on that class.

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.

None yet

2 participants