aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/res/layout/activity_view_subreddit_detail.xml8
-rw-r--r--app/src/main/res/layout/fragment_post.xml8
-rw-r--r--app/src/main/res/layout/item_post.xml63
-rw-r--r--app/src/main/res/values/strings.xml3
4 files changed, 48 insertions, 34 deletions
diff --git a/app/src/main/res/layout/activity_view_subreddit_detail.xml b/app/src/main/res/layout/activity_view_subreddit_detail.xml
index 6492e140..1460efac 100644
--- a/app/src/main/res/layout/activity_view_subreddit_detail.xml
+++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml
@@ -49,7 +49,6 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="36dp"
- android:paddingBottom="16dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:layout_below="@id/banner_image_view_view_subreddit_detail_activity"
@@ -75,7 +74,8 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="16dp">
+ android:layout_marginTop="16dp"
+ android:layout_marginBottom="16dp">
<TextView
android:id="@+id/subscriber_count_text_view_view_subreddit_detail_activity"
@@ -83,8 +83,7 @@
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:layout_alignParentStart="true"
- android:layout_toStartOf="@id/online_subscriber_count_text_view_view_subreddit_detail_activity"
- android:layout_marginBottom="16dp"/>
+ android:layout_toStartOf="@id/online_subscriber_count_text_view_view_subreddit_detail_activity" />
<TextView
android:id="@+id/online_subscriber_count_text_view_view_subreddit_detail_activity"
@@ -99,6 +98,7 @@
android:id="@+id/description_text_view_view_subreddit_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginBottom="16dp"
android:textColor="@android:color/black"
android:visibility="gone"/>
diff --git a/app/src/main/res/layout/fragment_post.xml b/app/src/main/res/layout/fragment_post.xml
index 9493bb8f..1c78fcad 100644
--- a/app/src/main/res/layout/fragment_post.xml
+++ b/app/src/main/res/layout/fragment_post.xml
@@ -22,7 +22,7 @@
android:layout_height="match_parent" />
<LinearLayout
- android:id="@+id/fetch_post_error_linear_layout_post_fragment"
+ android:id="@+id/fetch_post_info_linear_layout_post_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
@@ -30,16 +30,16 @@
android:visibility="gone">
<ImageView
- android:id="@+id/fetch_post_error_image_view_post_fragment"
+ android:id="@+id/fetch_post_info_image_view_post_fragment"
android:layout_width="150dp"
android:layout_height="wrap_content" />
<TextView
+ android:id="@+id/fetch_post_info_text_view_post_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
- android:gravity="center"
- android:text="@string/load_posts_error"/>
+ android:gravity="center" />
</LinearLayout>
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"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index d9622abe..c42202ca 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -11,6 +11,7 @@
<string name="tap_to_retry">Error loading image. Tap to retry.</string>
<string name="load_posts_error">Error loading posts.\nTap to retry.</string>
+ <string name="no_posts">No posts here.</string>
<string name="load_data_failed">Cannot load posts</string>
<string name="load_comment_failed">Error loading comments</string>
@@ -47,4 +48,6 @@
<string name="unfollow_failed">Unfollowing Failed</string>
<string name="content_description_banner_imageview">Subreddit Banner Image</string>
+
+ <string name="error_loading_posts">Error loading post</string>
</resources>