I need to create a free and paid version of the app and therefore I am using a library project with the common activities and resources in. However I was wondering how you would go about organising this:
A shared (library) activity MyActivity.java
launches a DialogFragment when a user clicks a buttons. The DialogFragment will be different for the free and paid apps. For the free app we will launch FreeDialog.java
and for paid we will launch PaidDialog.java
. These two dialog fragments will not be in the library project as they are not shared; they will be in the free and paid projects separately.
The only thing I can think is to make MyActivity.java
abstract and to extend it in the free and paid projects. The extensions will launch their respective DialogFragments.
Another way could be to overload the Fragments in each of the projects. However, I am not sure if this is possible.