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.

This commit is contained in:
Alex Ning
2018-08-11 17:49:30 +08:00
parent c0eaf2d3bb
commit eb973138f7
6 changed files with 49 additions and 2 deletions

View File

@@ -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>