Maksim Dmitriev Maksim Dmitriev - 1 year ago 98
Android Question

Should I keep and its derived classes when building a release version of my app?

I read this answer and undestood why I should keep names of my services, activities, and custom views. But should I keep my classes which derive from

I also took a look at the defualt Proguard config file

, and there were no rules regarding fragments.

Answer Source

The main reason why you would need to keep a class, is because it is accessed via reflection.

Fragments are normally not accessed via reflection, so you don't have to keep them.

Except if you reference them directly in layout files (because parsing layout files uses reflection).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download