Android examples for User Interface:Touch Event
set View On Touch Listener
//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*/ }