lsjwzh / RecyclerViewPager

Deprecated
Apache License 2.0
3.53k stars 667 forks source link

How to have multiple item displayed at once ? #137

Closed Cositdev closed 7 years ago

Cositdev commented 7 years ago

Hello !

I'd like to display the current item, and a part of the next one, how can i do that ? Just like this on a view pager http://stackoverflow.com/questions/13914609/viewpager-with-previous-and-next-page-boundaries

Thank you !

yichunyen commented 7 years ago

Here is the basic usage in README

<com.lsjwzh.widget.recyclerviewpager.RecyclerViewPager
    android:id="@+id/list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="15dp"
    android:paddingRight="15dp"
    app:rvp_triggerOffset="0.1"
    app:rvp_singlePageFling="true"
    android:clipToPadding="false"/>

Set the paddingRight/Left that you want to use, and set the clipToPadding attribute 'false'. I hope it will help you to implement the multiple views in RecyclerViewPager.

l3il2D commented 7 years ago

How can I make center item bigger that other like your Horizontal example?

yichunyen commented 7 years ago

@l3il2D

Have you read the SingleFlingPagerActivity.java in app folder? In the example, it told you how to change the ratio to scale your views when scroll the RecyclerViewPager.