diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-01-22 14:28:05 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-01-22 14:28:05 +0000 |
commit | 86570d495996141d3c74eecf7fc1735f9168ae50 (patch) | |
tree | bd6635bc63b42abfedbc03d86dba2c823cf78d4d /app/src/main/res | |
parent | d733be6e55eccc6fef34b0065f6044e8402aa3ad (diff) | |
download | infinity-for-reddit-86570d495996141d3c74eecf7fc1735f9168ae50.tar infinity-for-reddit-86570d495996141d3c74eecf7fc1735f9168ae50.tar.gz infinity-for-reddit-86570d495996141d3c74eecf7fc1735f9168ae50.tar.bz2 infinity-for-reddit-86570d495996141d3c74eecf7fc1735f9168ae50.tar.lz infinity-for-reddit-86570d495996141d3c74eecf7fc1735f9168ae50.tar.xz infinity-for-reddit-86570d495996141d3c74eecf7fc1735f9168ae50.tar.zst infinity-for-reddit-86570d495996141d3c74eecf7fc1735f9168ae50.zip |
Enlarge the area which contains subreddit or user name and icon for easier touching in ViewPostDetailActivity. Fixed subreddit icon cannot be loaded in ViewPostDetailActivity. Smoothly play gif subreddit icon in ViewPostDetailActivity.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/activity_view_post_detail.xml | 52 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post.xml | 3 |
2 files changed, 31 insertions, 24 deletions
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 bb2bd0e2..103edf40 100644 --- a/app/src/main/res/layout/activity_view_post_detail.xml +++ b/app/src/main/res/layout/activity_view_post_detail.xml @@ -26,38 +26,47 @@ android:layout_height="match_parent" android:orientation="vertical"> - <RelativeLayout + <android.support.constraint.ConstraintLayout android:id="@+id/relative_layout_view_post_detail" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_margin="16dp"> - - <de.hdodenhof.circleimageview.CircleImageView - android:id="@+id/subreddit_icon_circle_image_view_view_post_detail" - android:layout_width="24dp" - android:layout_height="24dp" - android:layout_alignParentStart="true" - android:layout_centerVertical="true" /> + android:layout_height="wrap_content"> - <TextView - android:id="@+id/subreddit_text_view_view_post_detail" + <LinearLayout + android:id="@+id/subreddit_icon_name_linear_layout_view_post_detail" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_marginStart="16dp" - android:layout_marginEnd="16dp" - android:layout_toEndOf="@id/subreddit_icon_circle_image_view_view_post_detail" - android:layout_toStartOf="@id/post_time_text_view_view_post_detail" - android:textColor="#E91E63" /> + android:padding="16dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <CustomView.AspectRatioGifImageView + android:id="@+id/subreddit_icon_circle_image_view_view_post_detail" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_gravity="center"/> + + <TextView + android:id="@+id/subreddit_text_view_view_post_detail" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_gravity="center" + android:textColor="#E91E63" /> + + </LinearLayout> <TextView android:id="@+id/post_time_text_view_view_post_detail" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_centerVertical="true" /> + android:layout_gravity="center" + android:layout_marginEnd="16dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent"/> - </RelativeLayout> + </android.support.constraint.ConstraintLayout> <TextView android:id="@+id/title_text_view_view_post_detail" @@ -93,6 +102,7 @@ android:layout_marginEnd="8dp" android:textSize="12sp" android:textColor="@android:color/white" + android:layout_centerVertical="true" app:chipBackgroundColor="@color/colorPrimaryDark"/> <ImageView diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml index 585c8931..b3d32486 100644 --- a/app/src/main/res/layout/item_post.xml +++ b/app/src/main/res/layout/item_post.xml @@ -37,7 +37,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="16dp" - android:layout_marginEnd="8dp" android:layout_gravity="center" android:textColor="#E91E63" /> @@ -72,9 +71,7 @@ android:id="@+id/title_text_view_best_post_item" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="16dp" android:layout_marginStart="16dp" - android:layout_marginRight="16dp" android:layout_marginEnd="16dp" android:textSize="18sp" android:textColor="#000000"/> |