diff options
author | Alex Ning <chineseperson5@gmail.com> | 2018-08-11 09:49:30 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2018-08-11 09:49:30 +0000 |
commit | eb973138f72b181f79d84bbf16c06f92760118e0 (patch) | |
tree | dd9495d830abcac15f81907dc0abd9e755fcfc02 /app/src/main/res | |
parent | c0eaf2d3bb599503d35753c69854d62275775f17 (diff) | |
download | infinity-for-reddit-eb973138f72b181f79d84bbf16c06f92760118e0.tar infinity-for-reddit-eb973138f72b181f79d84bbf16c06f92760118e0.tar.gz infinity-for-reddit-eb973138f72b181f79d84bbf16c06f92760118e0.tar.bz2 infinity-for-reddit-eb973138f72b181f79d84bbf16c06f92760118e0.tar.lz infinity-for-reddit-eb973138f72b181f79d84bbf16c06f92760118e0.tar.xz infinity-for-reddit-eb973138f72b181f79d84bbf16c06f92760118e0.tar.zst infinity-for-reddit-eb973138f72b181f79d84bbf16c06f92760118e0.zip |
Fixed a bug which causes the app to crash when there is no comment in a post. Add a no comment placeholder which is displayed when there is no comment in a post.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/no_comment_indicator.png | bin | 0 -> 60561 bytes | |||
-rw-r--r-- | app/src/main/res/layout/activity_view_post_detail.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 1 |
3 files changed, 25 insertions, 0 deletions
diff --git a/app/src/main/res/drawable/no_comment_indicator.png b/app/src/main/res/drawable/no_comment_indicator.png Binary files differnew file mode 100644 index 00000000..62a3668f --- /dev/null +++ b/app/src/main/res/drawable/no_comment_indicator.png diff --git a/app/src/main/res/layout/activity_view_post_detail.xml b/app/src/main/res/layout/activity_view_post_detail.xml index 8f6627a7..e696acf3 100644 --- a/app/src/main/res/layout/activity_view_post_detail.xml +++ b/app/src/main/res/layout/activity_view_post_detail.xml @@ -250,6 +250,30 @@ </android.support.v7.widget.CardView> + <LinearLayout + android:id="@+id/no_comment_wrapper_linear_layout_view_post_detail" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="48dp" + android:layout_marginBottom="48dp" + android:orientation="vertical" + android:visibility="gone"> + + <ImageView + android:id="@+id/no_comment_image_view_view_post_detail" + android:layout_width="150dp" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:layout_gravity="center_horizontal" + android:text="@string/no_comments_yet"/> + + </LinearLayout> + </LinearLayout> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 09e9c511..c7505627 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -12,6 +12,7 @@ <string name="load_comment_failed">Error loading comments</string> <string name="retry">Retry</string> <string name="comments">Comments</string> + <string name="no_comments_yet">No comments yet. Write a comment?</string> <string name="nsfw">NSFW</string> <string name="karma_info">Karma: %1$d</string> |