Reputation: 832
I have written an android app which has one main activity and 3 fragments . two fragment will update the list view dynamically based on the real time response . For the remaining respose I have to update with complete layouts , example first time it has to load with buttons and text filed and for next time it should change to progress bars and buttons , for next time it has change with some images .
I need help on how to load the different layouts for the 3rd fragment in realtime .
Upvotes: 1
Views: 659
Reputation: 75646
I doubt you can replace the layout the way you want. onCreateView()
is called once. What you can do is either to replace the whole fragment with the same, but initialized differently so it knows different layout should be used, or have your layout contain all items you want but keep unused invisible (View.GONE
) unless you need them.
Upvotes: 1