Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RImageView设置adjustViewBounds属性,高度始终不变 #96

Open
young-kingdom opened this issue Aug 17, 2021 · 2 comments
Open

RImageView设置adjustViewBounds属性,高度始终不变 #96

young-kingdom opened this issue Aug 17, 2021 · 2 comments

Comments

@young-kingdom
Copy link

young-kingdom commented Aug 17, 2021

属性设置如下

 <com.ruffian.library.widget.RImageView
                    android:id="@+id/img"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:adjustViewBounds="true"
                    android:scaleType="fitCenter"
                    android:src="@drawable/defualt"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:corner_radius="16dp" />

image
加载完图片后,所有图片的高度始终相等,而没有wrap_content。使用ImageView则正常,请问该如何解决?

@young-kingdom
Copy link
Author

image
这是实际效果

@young-kingdom
Copy link
Author

@RuffianZhong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant