onTrackballEvent

T

Tai

Neues Mitglied
0
Hi,

ich will wenn der Trackball bewegt wird eine Funktion öffnen, leider geht es nicht! Hier ist Quellcode!
Code:
@Override
    public boolean onTrackballEvent(MotionEvent event){
        switch(event.getAction()){
        case MotionEvent.ACTION_DOWN:
               Frage();
               mStatus.setText("Loading...");
              return true;
           } 
        return false;
    }
Bitte Hilft mir! Ich bin schon am verzweifeln!
 
Hi Tai,

Ich verstehe nicht wo dein Problem liegt. Du machst es doch fast komplett richtig einzigtses Problem ist.

case MotionEvent.ACTION_DOWN: // heißt runter drücken vom Trackball
case MotionEvent.ACTION_MOVE: // heißt bewegen

und schon müßte es funktionieren ;)
 
Zurück
Oben Unten