set View On Touch Listener - Android User Interface

Android examples for User Interface:Touch Event

Description

set View On Touch Listener

Demo Code


//package com.java2s;

import android.view.View;

public class Main {
    public static void setOnTouchListener(View container, int id,
            View.OnTouchListener listener) {
        if (container == null)
            return;

        container.findViewById(id).setOnTouchListener(listener);
    }/*from  w  w w  .j av a2 s . com*/
}

Related Tutorials