My Android app has 4 Tabs. On each Tab i am showing 3 – 4 Fragments.
This is how i am implementing this :
on each Tab click i am setting different content view. (I have 4 xml layout each having fragments)
setContentView(mLayout); // mLayout is the layout for selected Tab.
On each fragment i am adding some subview dynamically.
Now problem here is that tab switching is slow.
is there any way to speed up my Tab switching.
Thanks in advanced.
Maybe you can try this way.At first,you could inflate all the views you want to set.When you prepare to switch your table,first,removing the view from the current parent layout,then adding the view you want to set.