Skip to content

Feature android touch updates#3159

Open
danzeeeman wants to merge 6 commits intoopenframeworks:masterfrom
danzeeeman:feature-android-touch-updates
Open

Feature android touch updates#3159
danzeeeman wants to merge 6 commits intoopenframeworks:masterfrom
danzeeeman:feature-android-touch-updates

Conversation

@danzeeeman
Copy link
Copy Markdown
Member

This lets you use the onScroll listener of android to detect scroll events in the horizontal or vertical direction. Also passes down the velocity from the onFling event. These functions are really useful for touch based camera movements.

@bilderbuchi
Copy link
Copy Markdown
Member

So, doesn't this mean that anyone using the old onswipe/swipe functions (with two params) will now have a non-compiling project, as the declaration has been removed? If so, I think it would be better to keep the old version, but deprecate it so that people get warned about switching over.

Comment thread addons/ofxAndroid/src/ofxAndroidApp.h Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good to keep the old function and call it from the new one, so we don't break old code

@arturoc
Copy link
Copy Markdown
Member

arturoc commented Aug 21, 2014

didn't saw your comment @bilderbuchi :)

@danzeeeman
Copy link
Copy Markdown
Member Author

word I'll make two!

@danzeeeman
Copy link
Copy Markdown
Member Author

updated

Comment thread addons/ofxAndroid/src/ofxAndroidApp.h Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the one swipe method declaration separated from the other one? Also, could you mark this old method as deprecated using our macro? Which one is deprecated, though, as the new one seems to call the old one, further below?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the old function retained for compatibility. the new function calls the old one if it is not implemented in your ofAndroid app so the old function would still work.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But then, the old one should call the new one, internally. Otherwise we can't ever phase out the old one as the new one depends on its implementation. Also, the two declarations should still be grouped together for clarity (but that's a nitpick/style issue).

@artificiel artificiel mentioned this pull request Nov 1, 2023
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.

3 participants