Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

onclick listener android

Button myButton;
awesomeButton = new Button(this);
awesomeButton.setOnClickListener(new View.OnClickListener() {
	@Override
    public void onClick(View v) {
    	startActivity(new Intent(MainActivity.this,NewActivity.class));
    });
}
 
PREVIOUS NEXT
Tagged: #onclick #listener #android
ADD COMMENT
Topic
Name
2+9 =