Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Photo in state mode centerCrop #140

Closed
behnamk opened this issue Mar 16, 2020 · 0 comments
Closed

Photo in state mode centerCrop #140

behnamk opened this issue Mar 16, 2020 · 0 comments

Comments

@behnamk
Copy link

behnamk commented Mar 16, 2020

Hi
I'm going to put the photo in ultraviewpager as centerCrop.
Thanks for the help

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/post_pics_card"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginStart="10dp"
            android:layout_marginEnd="10dp"
            app:cardCornerRadius="15dp"
            app:layout_constraintDimensionRatio="h,4:3"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/linearLayout2">

            <com.tmall.ultraviewpager.UltraViewPager
                android:id="@+id/post_pics"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_centerInParent="true"
                android:adjustViewBounds="true"
                android:scaleType="centerCrop" />

        </com.google.android.material.card.MaterialCardView>

new pic

And thus become this state

pic2

@behnamk behnamk closed this as completed Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant