Hello, how are you?
I'm a beginner who's been doing a little bit of work... I'll give you one ㅠ<
This time, I'm printing an image using the Glide library Previously, when you want to fill the image horizontally and show the image of the original ratio
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
I used it in the same format as above. However, when I put the image using Glide in that state, it was printed differently from the original ratio Is it possible to give match_parent horizontally to Glide and vertical flexibly to each machine according to the original ratio?
android java
PercentFrameLayout
is located within the Android support library.
I think you can use it as below.
<android.support.percent.PercentFrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
app:layout_widthPercent="50%"
app:layout_heightPercent="50%"
app:layout_marginTopPercent="25%"
app:layout_marginLeftPercent="25%"/>
</android.support.percent.PercentFrameLayout>
© 2024 OneMinuteCode. All rights reserved.