开发者

How to pass intents to open another activity with button? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Cl开发者_JAVA技巧osed 11 years ago.

How to pass the intent to open another activity with button?


You have to create an onclicklistener on the button write something like:

button.setOnclickListener(new View.OnClickListener() 
{
    Intent myIntent = new Intent(CurrentActivity.this, NextActivity.class);
    CurrentActivity.this.startActivity(myIntent);
}

Create new activity in manifest.

Have a look at this tutorial http://www.warriorpoint.com/blog/2009/05/24/android-how-to-switch-between-activities/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜