my application is a social network in which users exchange links and post them to allow them to receive. Basically, the main activity is just a list of messages. I use an open protocol analyzer to get metadata of web objects on the server side.
Now I need to display the correct layout in each message element depending on the metadata (video, application, web page, ...). And, of course, layouts must respond to user click events and call intent.
So, my first idea is to have a framelayout for each element, where I load a specific fragment that is responsible for creating the correct layout depending on the type of resource.
But I'm really not sure that loading a fragment inside a listview element is good practice, since the reuse system for views is completely confused.
I just wanted to know how best to implement this functionality for you guys.
Thank.
source
share