0

I went to the YouTube Academy for Kotlin Android Development and created a semi complex app with Google FireBase, I have hit a roadblock in some code using an ExpandableListView that requires bindings.

After doing some research It seems that people use fragments instead of separate activities since like the past 10 years.
Should I convert all of my activities (besides main) to fragments?
Is there performance benefits?
How difficult is it to make this change?

1 Answers1

0

Actually this is more about development benefits rather than performance benefits. Fragments and activities are not just about showing some screens.This is more. You can check this and this questions for some understandings why to use fragments. There is also a popular concept in modern android development called "Single Activity Architecture". Please read this and this articles for having a good understanding. I think you will get all your answers.

Khaled Saifullah
  • 2,279
  • 3
  • 25
  • 26
  • Thank you, I'll check those out. I read a bit about this Single Activity Architecture schema, It seems anytime you'll reuse a 'view' it should be a fragment. I guess I could circumvent the binding issue with manually grabbing the ID. I'm not sure how this affects the CustomExpandableListView class, but I'll work it out. Was concerned this app was going to be performance inefficient with solely activities but looks like we're good for now. – Learning_slow May 13 '22 at 23:44