First drag a button in MainActivity.xml or in some other xml file , or use below code
<Button android:id="@+id/button" android:layout_width="match_parent"
android:layout_height="wrap_content android:text="Open Next Activity"
android:textColor="#ffffff"
android:textSize="22sp" />
Then Place below code in .java File
button = (Button) findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v)
{
startActivity(new Intent(MainActivity.this, nextactivity.class));
}
});
Then Go to File > New > Activity > Empty Activity and name this activity as nextactivity or some other name of your choice
Now When Your Press button then nextactivity will open in App
4 Comments
Great post I must say and thanks for the information.Durbin Labs provides Mobile and Web Application and Software Development Solution
ReplyDeleteMore info you can vist Cross-Platform App
Useful information that you share in this blog like same i am check more details in this tittle App Development in Chennai , Chennai app Development Company , Mobile app development Chennai , Android app development Chennai , iOS app development Chennai , best app development company Chennai , android application development Chennai , iOS application development Chennai , app development Chennai
ReplyDelete
ReplyDeleteVidmate latest version
Thank you for sharing this information to all..keep update..
ReplyDelete"SEO Services Company in Chennai
Mobile app development services in Chennai
Best ERP Software Packages in Chennai"