android - Viewpager OffscreenPageLimit issue -
i've multiple choice (radio buttons) questions on pages. i'm getting user answers hashmap. set previous question answer on start of next question. result start using set hashmap on start 2.page.
but problem is: think viewpager loads first 2 pages @ same time ; "set hashmap" on start 2.page goes null ; because 1. page isnt loaded / or loaded @ same time
how can rid of problem ?
- page: list answers (1)
- page: user choice(1), clear list(1), set list answers (2)
- page: user choice(2), clear list(2), set list answers (3) ...
maybe setoffscreenpagelimit 0 solution lowest value 1
this older answer can you. want know when fragment visible, , update there.
Comments
Post a Comment