set On Click Listener to View - Android User Interface

Android examples for User Interface:View Click

Description

set On Click Listener to View

Demo Code


//package com.java2s;

import android.view.View;
import android.view.View.OnClickListener;

public class Main {

    public static void setOnClickListener(OnClickListener Listener,
            View... views) {// ww  w  . j a  v  a  2  s  .  co  m
        for (View view : views) {
            view.setOnClickListener(Listener);
        }
    }
}

Related Tutorials