0
0 answers 2,499 views 6 years ago

Why is it recommended to use only the default constructor to create a Fragment?

The reason why you should be passing parameters through bundle is because when the system restores a fragment (e.g on config change), it will automatically restore your bundle. This way you are guaranteed to restore the state of the fragment correctly to the same state the fragment was initialised with.

Share:
S
Student User
Asked 6 years ago

0 Answer(s)

No answers yet

Be the first to help by answering this question!

Login to Answer

Login Required

Please login to submit an answer.

Community pulse
  • Total questions216
  • Answers posted19
  • Accepted answers0
  • Active learners11

Need personalised help?

Start a new discussion and get answers from verified teachers & toppers.

Ask now