0

Recently, I was placed on a project with another developer and he started our project with a BaseActivity (which extends ActionBarActivity), but when the app starts it runs MainActivity (which extends BaseActivity).

Activity Structure

BaseActivity = Parent
-- MainActivity = Child
-- AnotherActivity = Child

Wouldn't this be better practice to use MainActivity (which extends ActionBarActivity) and handle activity changes with Fragments?

Activity Structure    

MainActivity = Parent
-- DrawerFragment = Child
-- GraphFragment = Child

P.S. There are many external internet API calls that should be done at the "Parent" Activity level.

Michael
  • 9,639
  • 3
  • 64
  • 69

1 Answers1

0

Fragments are there for bigger displays like tablets. They allow you to display more than one fragment on the screen if it s big enough. It doesn't have anything to do with API calls. In my opinion it s easier to work with fragments, but you have to ask yourself if it s worth your time to implement it.

Marcin D
  • 918
  • 7
  • 14