aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout/item_post.xml
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2018-10-28 15:18:01 +0000
committerAlex Ning <chineseperson5@gmail.com>2018-10-28 15:18:01 +0000
commit6e5a0e7ef37ab148123a2fed2e50f84978e1f45a (patch)
treef7f65bb2ecf8e0ec7520d8846b003faaa5fa02ef /app/src/main/res/layout/item_post.xml
parent66402e661be86823cb11bc544cd0af482c3ec8ad (diff)
downloadinfinity-for-reddit-6e5a0e7ef37ab148123a2fed2e50f84978e1f45a.tar
infinity-for-reddit-6e5a0e7ef37ab148123a2fed2e50f84978e1f45a.tar.gz
infinity-for-reddit-6e5a0e7ef37ab148123a2fed2e50f84978e1f45a.tar.bz2
infinity-for-reddit-6e5a0e7ef37ab148123a2fed2e50f84978e1f45a.tar.lz
infinity-for-reddit-6e5a0e7ef37ab148123a2fed2e50f84978e1f45a.tar.xz
infinity-for-reddit-6e5a0e7ef37ab148123a2fed2e50f84978e1f45a.tar.zst
infinity-for-reddit-6e5a0e7ef37ab148123a2fed2e50f84978e1f45a.zip
Use AspectRatiotImageView instead of ImageView to fully display the preview images of posts and prevent scrolling jump in PostFragment and ViewPostDetailActivity.
Diffstat (limited to 'app/src/main/res/layout/item_post.xml')
-rw-r--r--app/src/main/res/layout/item_post.xml9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml
index 5ed9444c..cd200590 100644
--- a/app/src/main/res/layout/item_post.xml
+++ b/app/src/main/res/layout/item_post.xml
@@ -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"