Tuesday, 1 October 2013

Upadting References from List in Android

Upadting References from List in Android

I have an ViewPager and it's Adapter, in it's implementation I'm using a
List, to get the fragments and show them to the user, but when I rotate my
screen, I don't know what happens, It stops, I'm calling getView() in a
method, and It always returns null, after the screen has been rotate.
I've read that I need to update the references of the fragments, But how I
do that? I tried to ViewPager.setAdapter(null) and nothing, also tried to
ask if the List it's null, and nothing, don't know how to update
references or to recreate a ViewPager.

No comments:

Post a Comment