Is there any significant overhead when using FragmentActivity over normal Android activities?

There is not much to say here except the question of the title.

There are some actions in my application that don't use Fragments , so I was wondering if there is a performance difference when using plain Activity in these cases, or do I just need to go with FragmentActivity for the sake of consistency?

+4
source share
1 answer

If you do not use any special properties or methods of FragmentActivity , then it will be almost the same as normal activity (premature optimization). If you have finished programming FragmentActivity , and instead you can simply switch to the Activity extension, then you should change it to the Activity extension, because if your application sells well and you want to add additional functions to it and later you decide to change your regular Activity (but you extend it with FragmentActivity ) to SomeOtherTypeActivity, then most likely you will need to change your code somewhere else to fit the new implementation. But if you do not mind this, then staying with FragmentActivity should not cause performance hits.

+1
source

Source: https://habr.com/ru/post/1490348/


All Articles