Best practice to call a new screen

Asked

Viewed 36 times

-1

I have a Activity containing a RecyclerView, by clicking on it opens a Dialog with the selected item information.

And in that Activity has a FloatingActionButton, I want you to call a registration screen. What is the best practice of programming to call this screen?

  • Call another Dialog responsible for the register is a good?
  • I create a Activity only to be responsible for the registration?
  • I call a Fragment even?

1 answer

0


This will depend on what that registration will look like, if it’s something simple like name, value and date, for example, I believe that the Dialog already resolves, now if it is something more extensive, a large form, a Activity or the Fragment would be better, because the Dialog will get very large on screen, gets "ugly" visually talking.

Between the Activity and the Fragment you should analyze some things, the current context already has where to fit this Fragment?

Because if you have to create a whole structure for it, it’s best to save time and go from Activity, but if it is for example a screen with a Navigationdrawer, the Fragment already fits easier, but with Tabs I don’t think it would have the same effect, so maybe another Activity.

Browser other questions tagged

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