2

I am using Dave Smith's solution to make ViewPager behave like an image gallery. My problem is that setClipChildren(false) does not work on devices with 2.x (tried on HTC Desire S and Samsung Galaxy S, both with 2.3.5). Only one image is shown, and scrolling is only inside the viewpager area.

Searching, I have found two solutions:

setClipChildren(false);
setLayerType(View.LAYER_TYPE_SOFTWARE, null);

set to the container of the ViewPager, and on the pager, but setLayerType works only on API 11 and up. and:

android:hardwareAccelerated="false"

I have set this in the manifest, first for my activity and then for the whole app.

Neither of the solutions work for me. I know this is a known Android bug: info here. Do you happen to know a workaround for this? Thanks.

Mihaela Romanca
  • 1,368
  • 2
  • 14
  • 23

1 Answers1

1

You should try to call < setLayerType(View.LAYER_TYPE_SOFTWARE, null); > on container that is holding the view pager. Source: https://groups.google.com/forum/#!topic/android-developers/RIERxUcGpQg