I have a technical problem about my architecture. I explain my goal with this project.
I want to create a modular application. So I have created several modules; some have a UI and others do not.
My UI application is divided in three parts:
- one part, is the header, which display hours and some technical information
- another part is a list view where we can select the module to display.
- the final part is the content of the module or the default screen.
So I tried to explore fragment where each item of my listview is a fragment. According to user’s click, I load and display the view of the module in the content.
Each module do its treatment when it receives a intent from a broadcast.
An other idea, is to create, one view per module and attach this view to my current view (not create dynamically but with an xml).
I am so confused with the type of architecture to use.
If anyone has suggestions.
This sounds like an ideal use for fragments. The guide topic on fragments explains the general approach and also discusses FragmentLayout.java, which is part of the API Demos sample project.