Android Modular Programming

Viewed 987

My Problem might not be valid. And the points I mention here might be little incorrect as I am neither perfect nor expert.

I have a shopping application and I want to start building a modular application. Like I want to add Affiliate User( the module which adds certain functionality or this will display some extra pages in an application) in the application.

A similar situation happens in the Frameworks: We add and enable the certain module and in return framework load everything as required.

for this, I want following changes like:

  1. add an entry in the NavigationView displaying "Affiliate Label".
  2. load fragments (just adding one more fragment for one more label/option from navigation view).

Let's say I have a library project that contains a Fragment and all relevant code.

How can I build the application automatically let's say just by writing "true" somewhere in the XML?

Automatically here means label is added, Intents are performed on click of label etc.

<Modules>
<enable>true/false</enable>
</Modules>

This is just the simple scenario.

2 Answers
Related