₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,335 members, 8,421,399 topics. Date: Saturday, 06 June 2026 at 11:32 AM

Toggle theme

Creating Multiple Activity In Android - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingCreating Multiple Activity In Android (1053 Views)

1 Reply

Creating Multiple Activity In Android by richardwalter(op): 3:48pm On Feb 15, 2017
Hello,

I am creating an application which has lots of buttons on home screen and upon clicking any button - opens new activity. I would like to know how to code for multiple activity from one single activity.
Please help..
Thanks..!!



About me:
I'm new in this forum, I have worked with multiple firms
You can check Marketing automation software video ,one of my work.
Re: Creating Multiple Activity In Android by simiolu1(m): 4:17pm On Feb 15, 2017
Re: Creating Multiple Activity In Android by Dekatron(m): 6:05pm On Feb 15, 2017
If I can get you right, all you need to do is declare intents. Lets say I have activity A and I want to go to activity B after I click activity A, I will declare an onClick method (actually, Override it. I hope you know what Overriding means in java).
button.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// editText = (EditText) findViewById(R.id.editText);
// mailText = (EditText) findViewById(R.id.emailText);
// passText = (EditText) findViewById(R.id.passwordText);
// String passMessage = passText.getText().toString();
// String mailMessage = mailText.getText().toString();
// String messageText = editText.getText().toString();
// Intent intent = new Intent(MainActivity.this, ReceiveActivity.class);
// intent.putExtra("message",messageText);
// startActivity(intent);
// Intent in = new Intent(MainActivity.this, ReceiveActivity.class);
// in.putExtra("emailText", mailMessage);
// startActivity(in);
// Intent ins = new Intent(MainActivity.this, ReceiveActivity.class);
// ins.putExtra("passwordText", passMessage);
// startActivity(ins);
//
// }
// });



That is just a test code. Hope you catch the drift.
1 Reply

What Programming Language Is Used In Creating Viruses?Consuming Laravel Api In AndroidGradle Problem In Android Studio234

In Urgent Need Of A Peer To Peer SiteMATLAB Expert Needed For This SimulationLearn Mobile App Development