From 1da0e08552fbd5564eb7df539ec0d15d8201c1fa Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 26 Aug 2019 15:55:18 +0800 Subject: Tap the error view to retry loading comments in ViewPostDetailActivity. Minor UI tweaks. --- app/src/main/res/layout/activity_post_image.xml | 10 +++++++--- app/src/main/res/layout/activity_post_link.xml | 2 +- app/src/main/res/layout/activity_post_text.xml | 2 +- app/src/main/res/layout/activity_post_video.xml | 10 +++++++--- app/src/main/res/layout/activity_view_subreddit_detail.xml | 2 ++ app/src/main/res/layout/app_bar_main.xml | 2 ++ .../main/res/layout/item_load_comments_failed_placeholder.xml | 5 +++-- app/src/main/res/values-night/colors.xml | 2 ++ app/src/main/res/values/colors.xml | 2 ++ app/src/main/res/values/strings.xml | 2 +- 10 files changed, 28 insertions(+), 11 deletions(-) (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout/activity_post_image.xml b/app/src/main/res/layout/activity_post_image.xml index 2ea9b68b..795e53cf 100644 --- a/app/src/main/res/layout/activity_post_image.xml +++ b/app/src/main/res/layout/activity_post_image.xml @@ -64,7 +64,7 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="@string/rules" - android:textColor="@color/colorAccent" /> + android:textColor="@android:color/white" /> @@ -156,7 +156,9 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@+id/select_from_library_fab_post_image_activity" - app:layout_constraintHorizontal_chainStyle="spread" /> + app:layout_constraintHorizontal_chainStyle="spread" + app:backgroundTint="@color/backgroundColorPrimary" + app:tint="@android:color/white" /> + app:layout_constraintHorizontal_chainStyle="spread" + app:backgroundTint="@color/backgroundColorPrimary" + app:tint="@android:color/white" /> diff --git a/app/src/main/res/layout/activity_post_link.xml b/app/src/main/res/layout/activity_post_link.xml index 9de49a9e..54c843bf 100644 --- a/app/src/main/res/layout/activity_post_link.xml +++ b/app/src/main/res/layout/activity_post_link.xml @@ -64,7 +64,7 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="@string/rules" - android:textColor="@color/colorAccent" /> + android:textColor="@android:color/white" /> diff --git a/app/src/main/res/layout/activity_post_text.xml b/app/src/main/res/layout/activity_post_text.xml index b9798901..11001a14 100644 --- a/app/src/main/res/layout/activity_post_text.xml +++ b/app/src/main/res/layout/activity_post_text.xml @@ -64,7 +64,7 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="@string/rules" - android:textColor="@color/colorAccent" /> + android:textColor="@android:color/white" /> diff --git a/app/src/main/res/layout/activity_post_video.xml b/app/src/main/res/layout/activity_post_video.xml index 512f0304..3e87bd88 100644 --- a/app/src/main/res/layout/activity_post_video.xml +++ b/app/src/main/res/layout/activity_post_video.xml @@ -64,7 +64,7 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:text="@string/rules" - android:textColor="@color/colorAccent" /> + android:textColor="@android:color/white" /> @@ -156,7 +156,9 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@+id/select_from_library_fab_post_video_activity" - app:layout_constraintHorizontal_chainStyle="spread" /> + app:layout_constraintHorizontal_chainStyle="spread" + app:backgroundTint="@color/backgroundColorPrimary" + app:tint="@android:color/white" /> + app:layout_constraintHorizontal_chainStyle="spread" + app:backgroundTint="@color/backgroundColorPrimary" + app:tint="@android:color/white" /> 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 ab1dd28b..443881da 100644 --- a/app/src/main/res/layout/activity_view_subreddit_detail.xml +++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml @@ -125,6 +125,8 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" + app:backgroundTint="@color/backgroundColorPrimary" + app:tint="@android:color/white" app:srcCompat="@drawable/baseline_add_white_24" /> \ No newline at end of file diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml index 27a54b4c..5039ca20 100644 --- a/app/src/main/res/layout/app_bar_main.xml +++ b/app/src/main/res/layout/app_bar_main.xml @@ -72,6 +72,8 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" + app:backgroundTint="@color/backgroundColorPrimary" + app:tint="@android:color/white" app:srcCompat="@drawable/baseline_add_white_24" /> diff --git a/app/src/main/res/layout/item_load_comments_failed_placeholder.xml b/app/src/main/res/layout/item_load_comments_failed_placeholder.xml index f699efd0..9d8f9f7d 100644 --- a/app/src/main/res/layout/item_load_comments_failed_placeholder.xml +++ b/app/src/main/res/layout/item_load_comments_failed_placeholder.xml @@ -9,12 +9,13 @@ android:layout_width="150dp" android:layout_height="150dp" android:layout_gravity="center_horizontal" - android:src="@drawable/load_post_error_indicator"/> + android:src="@drawable/load_post_error_indicator" /> + android:gravity="center" + android:text="@string/load_comments_failed" /> \ No newline at end of file diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 418fd02d..4282dff3 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -22,6 +22,8 @@ #121212 + #1565C0 + #1565C0 #242424 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index b4c1fd87..65c75a1d 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -22,6 +22,8 @@ #FFFFFF + @color/colorPrimary + @color/colorPrimaryDark #FFFFFF diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8a88d944..09740a2f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -52,7 +52,7 @@ No users found No storage permission to save this file - Error loading comments + Error loading comments.\nTap to retry. Retry Comments No comments yet. Write a comment? -- cgit v1.2.3