Android examples for User Interface:Touch Event
set View Click Listener
//package com.java2s; import android.view.View; import android.view.View.OnClickListener; public class Main { public static void setClickListener(OnClickListener l, Object... obj) { for (int i = 0; i < obj.length; i++) { if (obj[i] instanceof View) { ((View) obj[i]).setOnClickListener(l); }/* www . j av a 2s. c o m*/ } } }