4

When I flip through the pages of a ViewPager, the background of a LinearLayout keeps changing from the grey color set in the Theme to white, and it do that only when flipping through pages, only in portrait mode and only in ICS.

It's perfectly working in all previous versions of Android.

EDIT: It looks like it's caused by the tag android:ellipsize="marquee" in the layout xml file. How can I avoid this issue?

TZHX
  • 5,291
  • 15
  • 47
  • 56
Mariux
  • 494
  • 6
  • 19

1 Answers1

0

I find this thread Android Viewpager saving data and views

By using view_pager.setOffscreenPageLimit(4);, this problem is solved (however, you can still see the white background for the first run, but it will work after that). Adjust the integer parameter according to your use ;)

Community
  • 1
  • 1
Warut Surapat
  • 503
  • 6
  • 12