+ 1
How to make two activity in android
hello , how to make two activity in android and button to go to second activity
4 ответов
+ 3
For going to another activity, just define setOnClickListener event on a button in FirstActivity inside onCreate Method.
Ex-
Button newButton=(Button)findViewById(R.id.btn1);
newButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(FirstActivity.this,SecondActivity.class);
startActivity(intent);
}
});
+ 2
You're welcome, I am a beginner too.
If you want to get a overview then go through android tutorials in YouTube and practice.
You can check this out-
Android App Development for Beginners Playlist: https://www.youtube.com/playlist?list=PL6gx4Cwl9DGBsvRxJJOzG4r4k_zLKrnxl
+ 1
thank you I'm beginner's android developer can you help me ??
+ 1
thanks again if i need anything I will tell you ok 😊