1
I have some Fragments with TableLayout
, is in that order:
1, 2, 3, 4, 5, 6
I used the method viewPager.setOffscreenPageLimit(5)
when I create mine viewPager
.
So far ok, I don’t want him carrying around all the time Fragments and the seOffscreenPageLimit
solved this for me. But I need the Fragment 1 recharge every time you reach it.
Does anyone have a solution for this? or have you ever suffered from something like this? Thank you
Can you explain the problem better?
setOffscreenPageLimit(5)
, contrary to what he says, he keeps all the Ragments in memory. What he means by "reload"?– ramaral
Exactly, it keeps all my Fragments in memory, and from what I’ve seen in the life cycle, it never gets into Fragment onCreateView, so far perfect. My problem is, I want to leave all Fragments in memory, I don’t need you logging into onCreateView, but I need Fragment 1 to always log into onCreateView for me to reload my webview.
– Igor Fastroni
Create a method in the given Fragment and put in it the code that reloads the Webview. Use the answer code of thiagoms83 and when this page is selected call this method.
– ramaral