Find Button by id - Android android.widget

Android examples for android.widget:Button

Description

Find Button by id

Demo Code

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Main{

    public static Button FindButton(Activity activity, int id) {
        return (Button) activity.findViewById(id);
    }/*from  w  w  w  . jav a 2  s  .  c  o  m*/

}

Related Tutorials