aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-06-22 03:58:20 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-06-22 03:58:20 +0000
commit724d3181e22a54de77ccf513dec0c19ddcfb8024 (patch)
treeadb837b1484a9d37830aa7d5778d33b49a65cdba /app/src/main/res
parent89e934f5a7d6d87562b1b2ad175fc43dfabc9b71 (diff)
downloadinfinity-for-reddit-724d3181e22a54de77ccf513dec0c19ddcfb8024.tar
infinity-for-reddit-724d3181e22a54de77ccf513dec0c19ddcfb8024.tar.gz
infinity-for-reddit-724d3181e22a54de77ccf513dec0c19ddcfb8024.tar.bz2
infinity-for-reddit-724d3181e22a54de77ccf513dec0c19ddcfb8024.tar.lz
infinity-for-reddit-724d3181e22a54de77ccf513dec0c19ddcfb8024.tar.xz
infinity-for-reddit-724d3181e22a54de77ccf513dec0c19ddcfb8024.tar.zst
infinity-for-reddit-724d3181e22a54de77ccf513dec0c19ddcfb8024.zip
ReImplemented loading more comments. Load more comments of comments by clicking the load more item (Still has a little issue). Minor bugs fixed.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/item_is_loading_more_comments.xml26
-rw-r--r--app/src/main/res/layout/item_load_more_comments.xml27
-rw-r--r--app/src/main/res/layout/item_load_more_comments_failed.xml29
-rw-r--r--app/src/main/res/values/strings.xml9
4 files changed, 89 insertions, 2 deletions
diff --git a/app/src/main/res/layout/item_is_loading_more_comments.xml b/app/src/main/res/layout/item_is_loading_more_comments.xml
new file mode 100644
index 00000000..7dfdf5cb
--- /dev/null
+++ b/app/src/main/res/layout/item_is_loading_more_comments.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <View
+ android:id="@+id/vertical_block_item_is_loading_more_comments"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:background="@color/textColorPrimaryDark" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:padding="8dp"
+ android:text="@string/loading"
+ android:textColor="@color/primaryTextColor" />
+
+ </LinearLayout>
+
+</com.google.android.material.card.MaterialCardView> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_load_more_comments.xml b/app/src/main/res/layout/item_load_more_comments.xml
new file mode 100644
index 00000000..5b92d767
--- /dev/null
+++ b/app/src/main/res/layout/item_load_more_comments.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <View
+ android:id="@+id/vertical_block_item_load_more_comments"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:background="@color/textColorPrimaryDark" />
+
+ <TextView
+ android:id="@+id/load_more_comments_text_view_item_load_more_comments"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:padding="8dp"
+ android:text="@string/comment_load_more_comments"
+ android:textColor="@color/primaryTextColor" />
+
+ </LinearLayout>
+
+</com.google.android.material.card.MaterialCardView> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_load_more_comments_failed.xml b/app/src/main/res/layout/item_load_more_comments_failed.xml
new file mode 100644
index 00000000..eb1b4e4f
--- /dev/null
+++ b/app/src/main/res/layout/item_load_more_comments_failed.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <View
+ android:id="@+id/vertical_block_item_load_more_comments_failed"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:background="@color/textColorPrimaryDark" />
+
+ <TextView
+ android:id="@+id/retry_text_view_item_load_more_comments_failed"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_gravity="center_vertical"
+ android:gravity="center"
+ android:padding="8dp"
+ android:text="@string/comment_load_more_comments_failed"
+ android:textColor="@color/primaryTextColor" />
+
+ </LinearLayout>
+
+</com.google.android.material.card.MaterialCardView> \ 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 6c9120c7..8cd06098 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -27,8 +27,8 @@
<string name="no_storage_permission">No storage permission to save this file</string>
<string name="load_posts_failed">Error loading posts</string>
- <string name="load_comment_failed">Error loading comments</string>
- <string name="load_more_comment_failed">Error loading more comments</string>
+ <string name="post_load_comments_failed">Error loading comments</string>
+ <string name="post_load_more_comments_failed">Error loading more comments</string>
<string name="retry">Retry</string>
<string name="comments">Comments</string>
<string name="no_comments_yet">No comments yet. Write a comment?</string>
@@ -80,4 +80,9 @@
<string name="download_completed">Download completed</string>
<string name="download_failed">Download Failed</string>
+
+ <string name="comment_load_more_comments">Load more comments</string>
+ <string name="comment_load_more_comments_failed">Load failed. Tap to retry.</string>
+
+ <string name="loading">Loading</string>
</resources>