Application for an Internship

When would it be a good idea for you to utilize a Fragment, as opposed to an Activity?

When would it be a good idea for you to utilize a Fragment, as opposed to an Activity?

Asked by
Last updated by Vin Diesel
1 Answers
Log in to answer

This is as yet a much-discussed theme, yet the code used to make an Activity is on a very basic level more required than the code used to make a Fragment. The old Activity must be crushed, delayed or halted, and another Activity must be made. The engineer ought to recognize that the best practice is to possibly utilize Activities when you have to swap the whole screen, and use sections wherever else.

Extra focuses if the Android designer makes reference to any of the accompanying use cases, where you'll quite often utilize a Fragment, as opposed to an Activity:

When you're working with UI segments or conduct that you're going to use over various Activities.

When you're utilizing one of the navigational techniques that are firmly connected to sections, for example, swipe sees.

At the point when your clients would profit by observing two unique designs one next to the other.

When you have information that necessities to continue crosswise over Activity restarts (i.e you have to utilize held sections).

Source(s)

Vin Diesel is a Consultant with the Application Development Company. He has been part of the program for a global Technology major and currently owns the responsibility of leading all Information services and Technology service for the customer. http://www.fortifive.com/app-development-los-angeles/