Android Application Programming
Tips & Tricks
Wednesday, June 4, 2014
How to open a new layout after button click in android
Use the below code,
Button next = (Button) findViewById(R.id.mybutton1);
next.setOnClickListener(new View.OnClickListener()
{
public void onClick(View view)
{
Intent myIntent = new Intent(view.getContext(), my_activity.class);
startActivityForResult(myIntent, 0);
}
});
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment