From 2f15543f913da5c9100ce114f4268c0576b70a3e Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 22 Jul 2019 00:09:40 +0800 Subject: Add a ViewPager in ViewUserDetailActivity to display comments. Fixed searching posts without specifying subreddit will result in no posts. Use another api endpoint for fetching posts in ViewUserDetailActivity. --- .../main/res/layout/activity_view_user_detail.xml | 20 ++++++++- .../main/res/layout/fragment_comments_listing.xml | 48 ++++++++++++++++++++++ .../item_load_comments_failed_placeholder.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 4 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/layout/fragment_comments_listing.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/layout/activity_view_user_detail.xml b/app/src/main/res/layout/activity_view_user_detail.xml index fac8a2ca..67beecd2 100644 --- a/app/src/main/res/layout/activity_view_user_detail.xml +++ b/app/src/main/res/layout/activity_view_user_detail.xml @@ -7,6 +7,12 @@ android:id="@+id/coordinator_layout_view_user_detail_activity" tools:context=".ViewUserDetailActivity"> + + + + - + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_comments_listing.xml b/app/src/main/res/layout/fragment_comments_listing.xml new file mode 100644 index 00000000..bac6f507 --- /dev/null +++ b/app/src/main/res/layout/fragment_comments_listing.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + \ No newline at end of file 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 d81cdb97..f699efd0 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 @@ -15,6 +15,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" - android:text="@string/post_load_comments_failed"/> + android:text="@string/load_comments_failed"/> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ba9c2924..76e3f626 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -33,7 +33,7 @@ No storage permission to save this file Error loading posts - Error loading comments + Error loading comments Retry Comments No comments yet. Write a comment? -- cgit v1.2.3