From 6e5a0e7ef37ab148123a2fed2e50f84978e1f45a Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 28 Oct 2018 23:18:01 +0800 Subject: Use AspectRatiotImageView instead of ImageView to fully display the preview images of posts and prevent scrolling jump in PostFragment and ViewPostDetailActivity. --- app/src/main/res/layout/activity_view_post_detail.xml | 6 ++++-- app/src/main/res/layout/item_post.xml | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout/activity_view_post_detail.xml b/app/src/main/res/layout/activity_view_post_detail.xml index b9c13bcb..6f6bac2a 100644 --- a/app/src/main/res/layout/activity_view_post_detail.xml +++ b/app/src/main/res/layout/activity_view_post_detail.xml @@ -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"> - + android:layout_height="wrap_content" + android:layout_centerInParent="true"> @@ -146,11 +147,11 @@ android:layout_height="wrap_content" android:layout_centerInParent="true" /> - + android:layout_height="wrap_content" + android:scaleType="fitStart" />