Devlight / InfiniteCycleViewPager

Infinite cycle ViewPager with two-way orientation and interactive effect.
Apache License 2.0
5.75k stars 831 forks source link

How to increase the size of card in VerticalCycleViewPager? #13

Closed droid-wise closed 8 years ago

droid-wise commented 8 years ago

14215367_1468399809840556_2037334976_o

Here is a code from main layout where is located vertical cycler view pager:

`<FrameLayout android:layout_above="@+id/bottom_menu_bar" android:id="@+id/frame_layout" android:layout_centerInParent="true" android:layout_width="match_parent" android:layout_height="wrap_content">

    <com.solaris.want2know.infinitecyclerviewpager.VerticalInfiniteCycleViewPager
        android:id="@+id/view_pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:icvp_interpolator="@android:anim/overshoot_interpolator"
        app:icvp_center_page_scale_offset="0dp"
        app:icvp_max_page_scale="0.9"
        app:icvp_medium_scaled="true"
        app:icvp_min_page_scale="0.7"
        app:icvp_min_page_scale_offset="-20dp"
        app:icvp_scroll_duration="500"/>

</FrameLayout>`

And here is located item view for every card in vertical cycle view pager:

`<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto">

<android.support.v7.widget.CardView
    android:layout_gravity="center"
    android:layout_width="match_parent"
    android:layout_height="300dp"
    app:cardUseCompatPadding="true"
    app:cardPreventCornerOverlap="false"
    app:cardCornerRadius="10dp"
    app:cardElevation="20dp">

    <ImageView
        android:id="@+id/image"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:adjustViewBounds="true"
        android:layout_gravity="center"/>
</android.support.v7.widget.CardView>

`

GIGAMOLE commented 8 years ago

Hello. Thanks for contact. So, what exactly do you need?

GIGAMOLE commented 8 years ago

As I see. There is no problem around.

droid-wise commented 8 years ago

I want to increase the size for this card a little bit more, but if i do that, white background of card i can see and my image i'm fetching from API is centered.

GIGAMOLE commented 8 years ago

You need to change height?

GIGAMOLE commented 8 years ago

You can set max scale to bigger value then 1.0F.

GIGAMOLE commented 8 years ago

Also you can try sample app and achieve similar effect with vertical ICVP where used correct bounds.

droid-wise commented 8 years ago

Thank you, i will try that.

ghost commented 6 years ago

Did you achieve to change card height? Im Having a similar issue where I want to keep scale width but a taller card...