click On Activity - Android Activity

Android examples for Activity:Activity Action

Description

click On Activity

Demo Code


//package com.java2s;
import android.app.Activity;
import android.view.View;

public class Main {
    public static void clickOn(Activity activity, int id) {
        activity.findViewById(id).performClick();
    }/*from ww  w.  ja v a2s . c o m*/

    public static void clickOn(View view, int id) {
        view.findViewById(id).performClick();
    }
}

Related Tutorials