Closed ianeinser closed 5 years ago
Hello, @ianeinser. Readme of this lib tells you everything you need. Here are the attributes you can specify in the constructor or XML layout: activeCardLeft - Active card offset from start of RecyclerView. Default value is 50dp. cardWidth - Card width. Default value is 148dp. cardsGap - Distance between cards. Default value is 12dp.
Example:
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="210dp"
android:layout_marginStart="@dimen/recycler_view_left_offset"
android:layout_marginTop="18dp"
android:clipChildren="false"
android:overScrollMode="never"
app:activeCardLeftOffset="150dp"
app:layoutManager="com.ramotion.cardslider.CardSliderLayoutManager"
app:viewUpdater="com.ramotion.cardslider.examples.simple.cards.CardsUpdater" />
If you need some other behavior, you may fork this lib and apply any changes you want.
Hey @golovin47 ,
Thanks a lot. app:activeCardLeftOffset="150dp" does the job! thanks
Hi @golovin47 ,
it is me again... i tried to set app:activeCardLeftOffset="20dp" but the active card covers the card behind completely. How to place the covered card a little bit left (not the active card)?
Left offset is being calculated by many params. If you need to customize it, you'll have to fork the lib and change CardSliderLayoutManager.
Hi,
i tried to set the parameter recycler_view_left_offset in dimens.xml and DEFAULT_ACTIVE_CARD_LEFT_OFFSET in CardSliderLayoutManager but it doesn't work. I appreciate if you can share the tip.