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

Implement "isInTouchMode()" for linked bars and colorPicker #33

Open
nouser2013 opened this issue Feb 8, 2014 · 3 comments
Open

Implement "isInTouchMode()" for linked bars and colorPicker #33

nouser2013 opened this issue Feb 8, 2014 · 3 comments

Comments

@nouser2013
Copy link

sometimes, it is necessary to avoid doing blocking stuff while the user is interacting with the controls. Unfortunately, with the current implementation, the super.isInTouchMode() always returned true. Maybe implement an overriden version that utilizes the already present touch event and simply returns false if neither the colorPicker nor any linked bars are touched by the user.

Would possibly require public getters/setters in colorpicker for the mUserIsMovingPointer variable, so that that it can be set from bars as well and developers only need to query colorPicker.isInTouchMode().

@LarsWerkman
Copy link
Owner

Also a great comment! I will try something this week!

@LarsWerkman
Copy link
Owner

So I checked with Android views and they don't seem to inplement the isintouchmode and also always return "true". is that right?

@nouser2013
Copy link
Author

Hm, yes and no. See here: http://android-developers.blogspot.de/2008/12/touch-mode.html isInTouchMode() returns true, if the user interacted last with the device via touch screen. If (on older devices) the user used the trackball, or (on newer devices) the user used arrow keys from USB keyboard or the mouse, the function will return false.

To expand my request then, let's not overwrite this from super inherited function, but introduce a new function that merely returns true, if a user is touching the color picker or any attached Bars.

I personally need this functionality to prevent the user from accidentally activating a control that is in close proximity to the ColorPicker and reacts "onFingerOver" (similar to JavaScript's onMouseOver). It happens sometimes, and for devices with smaller screensize I do not want to change the UI, i.e. increasing the empty space between them.

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

No branches or pull requests

2 participants