Last active
August 29, 2015 14:02
-
-
Save jwill/6e10a96fb5cfde9dd3a3 to your computer and use it in GitHub Desktop.
t
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The final step in your Custom View creation is adding interactivity. You can listen for user input events including [draw] keypresses | |
[draw] Trackball movement, and | |
most importantly [draw] screen touch events, by overriding the corresponding event handlers. | |
Android supports tracking of up to 11 individual contact points in what we like to call “Jazz Hands” mode -- enabling you to create complex multi-finger interaction models. | |
There’s really no interaction required for a wind gauge, but you can find out more about handling Input events by checking the MotionEvent docs, or the developer guide on creating your own fully interactive custom views in the Instructor Notes below. | |
Now be careful not to let this new found power go to your head. By definition, your users will never have encountered your brand-spanking new control -- so learning how to use it will add friction to their use of your app. At the very least, it should behave consistently with the rest of the system, and you should avoid creating your own versions of system controls. If it look kinda-like a button, and works kinda-like a button. You should probably just go ahead and use a button. | |
But I think this non-sequitur has gone on long enough -- and it’s time to get back to our weather app. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment