mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 13:29:50 +02:00
Use AspectRatiotImageView instead of ImageView to fully display the preview images of posts and prevent scrolling jump in PostFragment and ViewPostDetailActivity.
This commit is contained in:
@@ -100,6 +100,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="12sp"
|
||||
android:background="@drawable/rounded_corner"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
@@ -156,7 +157,7 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
<com.santalu.aspectratioimageview.AspectRatioImageView
|
||||
android:id="@+id/image_view_view_post_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -166,7 +167,8 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/load_wrapper_view_post_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar_view_post_detail"
|
||||
|
@@ -83,6 +83,7 @@
|
||||
android:background="@drawable/rounded_corner"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@android:color/white"/>
|
||||
|
||||
<ImageView
|
||||
@@ -136,7 +137,7 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/image_view_wrapper_item_best_post"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="350dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone">
|
||||
|
||||
@@ -146,11 +147,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<ImageView
|
||||
<com.santalu.aspectratioimageview.AspectRatioImageView
|
||||
android:id="@+id/image_view_best_post_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop" />
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitStart" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/load_image_error_linear_layout_best_post_item"
|
||||
|
Reference in New Issue
Block a user