Search in sources :

Example 1 with OnGenericMotionListener

use of android.view.View.OnGenericMotionListener in project platform_frameworks_base by android.

the class Interaction method register.

public static void register(View v, final Callback callback) {
    v.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            callback.onInteraction();
            return false;
        }
    });
    v.setOnGenericMotionListener(new OnGenericMotionListener() {

        @Override
        public boolean onGenericMotion(View v, MotionEvent event) {
            callback.onInteraction();
            return false;
        }
    });
}
Also used : OnTouchListener(android.view.View.OnTouchListener) OnGenericMotionListener(android.view.View.OnGenericMotionListener) View(android.view.View) MotionEvent(android.view.MotionEvent)

Example 2 with OnGenericMotionListener

use of android.view.View.OnGenericMotionListener in project android_frameworks_base by crdroidandroid.

the class Interaction method register.

public static void register(View v, final Callback callback) {
    v.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            callback.onInteraction();
            return false;
        }
    });
    v.setOnGenericMotionListener(new OnGenericMotionListener() {

        @Override
        public boolean onGenericMotion(View v, MotionEvent event) {
            callback.onInteraction();
            return false;
        }
    });
}
Also used : OnTouchListener(android.view.View.OnTouchListener) OnGenericMotionListener(android.view.View.OnGenericMotionListener) View(android.view.View) MotionEvent(android.view.MotionEvent)

Example 3 with OnGenericMotionListener

use of android.view.View.OnGenericMotionListener in project android_frameworks_base by AOSPA.

the class Interaction method register.

public static void register(View v, final Callback callback) {
    v.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            callback.onInteraction();
            return false;
        }
    });
    v.setOnGenericMotionListener(new OnGenericMotionListener() {

        @Override
        public boolean onGenericMotion(View v, MotionEvent event) {
            callback.onInteraction();
            return false;
        }
    });
}
Also used : OnTouchListener(android.view.View.OnTouchListener) OnGenericMotionListener(android.view.View.OnGenericMotionListener) View(android.view.View) MotionEvent(android.view.MotionEvent)

Example 4 with OnGenericMotionListener

use of android.view.View.OnGenericMotionListener in project android_frameworks_base by DirtyUnicorns.

the class Interaction method register.

public static void register(View v, final Callback callback) {
    v.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            callback.onInteraction();
            return false;
        }
    });
    v.setOnGenericMotionListener(new OnGenericMotionListener() {

        @Override
        public boolean onGenericMotion(View v, MotionEvent event) {
            callback.onInteraction();
            return false;
        }
    });
}
Also used : OnTouchListener(android.view.View.OnTouchListener) OnGenericMotionListener(android.view.View.OnGenericMotionListener) View(android.view.View) MotionEvent(android.view.MotionEvent)

Example 5 with OnGenericMotionListener

use of android.view.View.OnGenericMotionListener in project android_frameworks_base by ResurrectionRemix.

the class Interaction method register.

public static void register(View v, final Callback callback) {
    v.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            callback.onInteraction();
            return false;
        }
    });
    v.setOnGenericMotionListener(new OnGenericMotionListener() {

        @Override
        public boolean onGenericMotion(View v, MotionEvent event) {
            callback.onInteraction();
            return false;
        }
    });
}
Also used : OnTouchListener(android.view.View.OnTouchListener) OnGenericMotionListener(android.view.View.OnGenericMotionListener) View(android.view.View) MotionEvent(android.view.MotionEvent)

Aggregations

MotionEvent (android.view.MotionEvent)5 View (android.view.View)5 OnGenericMotionListener (android.view.View.OnGenericMotionListener)5 OnTouchListener (android.view.View.OnTouchListener)5