When I try to replace the gallery widget which display images on the horizontal center using ViewPager. I encounter a problem: with normal Viewpager provided by android support v4, images item won't show right on the horizontal center, instead always on Left. So I customized the ViewPager based on the source code.
You can install the Demo.apk on the root directory to see the final performance.
you can just copy the CenterViewPager file to your specific "View" folder in your project. Then use it like the normal ViewPager.