My application contains two segmented button to show compact & visual filters.
On click of visual filter segmented button i wanted to create the Visual filter fragment through xml views.
Currently we are creating both compact and visual filters in xml view and using visibility we are hiding the one of the compact or visual filters.
Is there away we can control the creation of fragment based on model update instead of visibility change so that we can avoid backed calls for invisible items.