How to move something from a virtual dpad on-screen

Posted by Kriegalex on Stack Overflow See other posts from Stack Overflow or by Kriegalex
Published on 2010-06-07T18:26:15Z Indexed on 2010/06/07 18:32 UTC
Read the original article Hit count: 229

Filed under:

Hello everyone,

I've started a little game, and so far I'm moving a little guy with onKeyDown() and the DPAD from Android Emulator. Now what I want to do is to add 4 buttons on the screen (like in a GAMEBOY emulator for example) and these buttons should move my little guy. With a clickListener and onClick() (or touchListener and onTouch()), it's ok for one move but how to do if I want that my little guy continues moving when I stay clicked on the button ??? Buttons are enough or should I make a 4 arrows soft keyboard or anything else ??

Thanks

© Stack Overflow or respective owner

Related posts about android