0

I have this problem,

in my app there is a viewpager with 3 page, in the middle page (position 1) I have set getPageWidth 0.80f then the page 1 is composed by fragment1 + 0.20 of fragment2 when I scroll to right , from page 0 to page 1 , in this page, the fragment2 refresh after fragment1.

I adopted notifyDataSetChanged(), requestLayout() and I saw this answer :

ViewPager + PagerAdapter shows blank pages after first two items

but I don't resolve my problem.

The question is: how i force update the partial page2 in the viewpager in the same time when update the page1?

Thanks all

Community
  • 1
  • 1
bludef
  • 211
  • 2
  • 7
  • You describe your behavior and describe what you've tried but I fail to see the real question – RMalke Feb 03 '13 at 10:23
  • Sorry, I have update now the post. – bludef Feb 03 '13 at 10:33
  • 1
    I'm not sure if I understand you right, but have you tried this: http://stackoverflow.com/questions/7263291/viewpager-pageradapter-not-updating-the-view/7287121#7287121 ? This will cause that your fragments will not be cached and everytime you swipe, a fragment will be recreated. – Michał Z. Feb 03 '13 at 10:56
  • yes, I have already seen this solution, but for me the problem is in the call of requestlayout o ondraw or onmeasure in the viewpager :( I want force that viewpager refreshes both fragment 1 and partial of fragment 2. – bludef Feb 03 '13 at 11:37

0 Answers0