Hello folks!

I want to use a button that when pressed, the motor begin to work, and just 
stop when i release the button.
I'm trying with the following programmation:

yourbutton.setOnTouchListener(new OnTouchListener(){
    @Override
    public boolean onTouch(View v, MotionEvent event)
    {
        if(event.getAction() == MotionEvent.ACTION_DOWN)
        {
            ((Button) v).setPressed(true);
            //TODO: Add the code of your onClick-event here
        }
        return true;//Return true, so there will be no onClick-event
    }});

Somebody can to help me?


Thanks! ;D

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to