Reputation: 2095
I'm working on an Android app, which when the user taps on an icon, a Layout defined (for now) in the main layout slides up with some information.
The problem is that I have icons of different types, so when one clicks on one type of icon or another, the information in the pop up should be different (there are different objects with different structures behind those icons).
What possibilities do I have? The programmatic way just does not seem elegant enough. Are there any templating frameworks in Android? Please provide some examples, too.
Upvotes: 0
Views: 93
Reputation: 1196
You could sub-class your icons (that means the types that are shown with each icon), like having each one it's own fragment sub-class, an then you can use a different layout on fragment.
Here is more info about Fragments
Upvotes: 1