Sunday, April 21, 2019

Android Move One Activity To Another

In Android To Move One Activity To Another Activity Using Intent.

Two Types of Intent:

1) Explicit Intent.
2) Implicit Intent.

1) Explicit Intent:
                           Moving With In Your Application.

2) Implicit Intent:
                           Access Outside of Your Application.
(E.X) Access Camera,Gallery on Your Mobile.


So, We Can Use Explicit Intent To Solve This,

Intent intent = new Intent(this,SecondActivity.class);
startActivity(intent);


this --> refers to the current activity.

SecondActivity.class --> Where to You Go.

startActivity --> Start The SecondActivity From Your Current Activity.

2 comments: