Android sliding items horizontal like in Duolingo App

六眼飞鱼酱① 提交于 2019-12-04 13:08:13

Use classic ViewPager to show content and then apply to pager this PageTransformer:

   if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            mPager.setPageTransformer(false, new ViewPager.PageTransformer() {
                @Override
                public void transformPage(View page, float position) {
                    final float normalizedposition = Math.abs(Math.abs(position) - 1);
                    page.setScaleX(normalizedposition / 2 + 0.5f);
                    page.setScaleY(normalizedposition / 2 + 0.5f);
                }
            });
        }
Chandru

This is the exact requirement for your postings. Kindly go through this URL https://github.com/davidschreiber/FancyCoverFlow. Download the zip and run the sample. Enjoy!! Its easy to customize too...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!