aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout/item_post.xml
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-01-22 10:45:02 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-01-22 10:45:02 +0000
commitd733be6e55eccc6fef34b0065f6044e8402aa3ad (patch)
treed672b21370b38123e6741e3ab2a911457b78b588 /app/src/main/res/layout/item_post.xml
parentf7a192dcbedb09a6d29e7879f6119edd47278f6f (diff)
downloadinfinity-for-reddit-d733be6e55eccc6fef34b0065f6044e8402aa3ad.tar
infinity-for-reddit-d733be6e55eccc6fef34b0065f6044e8402aa3ad.tar.gz
infinity-for-reddit-d733be6e55eccc6fef34b0065f6044e8402aa3ad.tar.bz2
infinity-for-reddit-d733be6e55eccc6fef34b0065f6044e8402aa3ad.tar.lz
infinity-for-reddit-d733be6e55eccc6fef34b0065f6044e8402aa3ad.tar.xz
infinity-for-reddit-d733be6e55eccc6fef34b0065f6044e8402aa3ad.tar.zst
infinity-for-reddit-d733be6e55eccc6fef34b0065f6044e8402aa3ad.zip
Fixed the user's posts cannot be loaded. Refreshing in MainActivity also refreshes user info, subscribed users and subreddits. Enlarge the area which contains subreddit or user name and icon for easier touching.
Diffstat (limited to 'app/src/main/res/layout/item_post.xml')
-rw-r--r--app/src/main/res/layout/item_post.xml63
1 files changed, 37 insertions, 26 deletions
diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml
index 1d686e52..585c8931 100644
--- a/app/src/main/res/layout/item_post.xml
+++ b/app/src/main/res/layout/item_post.xml
@@ -13,49 +13,60 @@
android:layout_height="wrap_content"
android:orientation="vertical">
- <RelativeLayout
+ <android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="16dp">
-
- <CustomView.AspectRatioGifImageView
- android:id="@+id/subreddit_icon_gif_image_view_best_post_item"
- 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_best_post_item"
+ <LinearLayout
+ android:id="@+id/subreddit_icon_name_linear_layout_view_item_best_post"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginStart="16dp"
- android:layout_marginEnd="8dp"
- android:layout_toStartOf="@id/stickied_post_image_view_best_post_item"
- android:layout_toEndOf="@id/subreddit_icon_gif_image_view_best_post_item"
- android:layout_centerVertical="true"
- android:textColor="#E91E63"/>
+ android:layout_height="wrap_content"
+ 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_gif_image_view_best_post_item"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center"/>
+
+ <TextView
+ android:id="@+id/subreddit_text_view_best_post_item"
+ 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" />
+
+ </LinearLayout>
<ImageView
android:id="@+id/stickied_post_image_view_best_post_item"
android:layout_width="24dp"
android:layout_height="24dp"
- android:layout_toStartOf="@id/post_time_text_view_best_post_item"
+ android:layout_gravity="center"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
- android:layout_centerVertical="true"
android:tint="@color/colorPrimary"
- android:visibility="gone"/>
+ android:visibility="gone"
+ app:layout_constraintEnd_toStartOf="@+id/post_time_text_view_best_post_item"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/post_time_text_view_best_post_item"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:layout_alignParentEnd="true"
- android:layout_centerVertical="true"
- android:gravity="center_vertical"/>
+ 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_best_post_item"