Friday, July 6, 2012

[android-developers] Android ViewPager invalidate() not working


Hai all,
I've just started with android development and invalidate the ViewPager is really bugging me :/

Can someone tell me how can i invalidate the ViewPager while changing the orientation.

This is what I've tried so far -

@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);

     myPager = (ViewPager) findViewById(R.id.my_pager);
     myPager.setAdapter(adapter);
     myPager.setCurrentScreen(currentPosition, false);
     invalidate();
}
The above code is working fine when attached debugging. But it is not working on runtime (without debug mode). I have also tried with sleep but no changes on view.

Can someone explain in detail what is happening here?

Thanks in advance :)
--
WITH REGARDS
ARUN KUMAR P D
+91-9994794759

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate