How to swap fragments with different layouts in android?

Viewed 6451

I'm developing an android application making use of fragments which is more of a Master/Detail form. I want the main activity to consist of a list fragment on the left side, based on the item chosen on the left i want to display a fragment with different layout on the right side. (Note: each fragment on the right require different layouts/views)

All the examples that I've come across make use of only one common fragment on the right by changing some values in it or swapping/replacing new fragments having same layout.

If someone could shed some light on this problem then it will help me immensely. Thanks!

1 Answers
Related