About Activities in Android/Java

Asked

Viewed 49 times

0

Good night. My doubt is simple.
My app has a system where I open 5 activities for registration (first Activity 1, then 2 and so on. imagine it is something like a windows installation where you have several windows with "next")
From the fifth Activity it goes back to the first, and when the user needs a new registration, the process happens again.
This is the code I use to pass between activities:

Intent novaActivity = new Intent(getApplicationContext(), proximaActivity);
                novaActivity.putStringArrayListExtra("activities", activitiesSelecionadas);
                startActivity(novaActivity);
                finish();

Is there any possibility of the application getting too heavy after several registrations?

  • 1

    If from the fifth Activity the user returns to the first after finishing the registration the best is to clean the Back Stack and the problem ceases to exist.

  • I will search on. Thanks for the tip!

1 answer

0

From what I see the ideal architecture for this process (assuming it is all part of the registration) is to have only one Activity and 5 fragments. This way you can manage layouts, scalability and information (which can be all in Activity) better.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.