diff options
author | Alex Ning <chineseperson5@gmail.com> | 2018-08-30 06:08:02 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2018-08-30 06:08:02 +0000 |
commit | 4364e20e36aba6de96d25b237cac7c178a5e1980 (patch) | |
tree | 1738f18c8dcafcc3aff1a5b302eaa6febdb298b1 /app/src/main/res/layout/fragment_post.xml | |
parent | 3fa625742862f55e50799ec346fa35e81aedcd20 (diff) | |
download | infinity-for-reddit-4364e20e36aba6de96d25b237cac7c178a5e1980.tar infinity-for-reddit-4364e20e36aba6de96d25b237cac7c178a5e1980.tar.gz infinity-for-reddit-4364e20e36aba6de96d25b237cac7c178a5e1980.tar.bz2 infinity-for-reddit-4364e20e36aba6de96d25b237cac7c178a5e1980.tar.lz infinity-for-reddit-4364e20e36aba6de96d25b237cac7c178a5e1980.tar.xz infinity-for-reddit-4364e20e36aba6de96d25b237cac7c178a5e1980.tar.zst infinity-for-reddit-4364e20e36aba6de96d25b237cac7c178a5e1980.zip |
Display a custom error view when there is something wrong when loading best posts. Probably fix a bug that holder.getAdapterPosition() returns -1 when loading subreddit icons in the RecyclerView of PostFragment. Subreddit banners are parsed correctly in ParseSubscribedThing. Check if the api call is successful in onResponse. Rewrite some methods.
Diffstat (limited to 'app/src/main/res/layout/fragment_post.xml')
-rw-r--r-- | app/src/main/res/layout/fragment_post.xml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/src/main/res/layout/fragment_post.xml b/app/src/main/res/layout/fragment_post.xml index e18a4a62..431a2292 100644 --- a/app/src/main/res/layout/fragment_post.xml +++ b/app/src/main/res/layout/fragment_post.xml @@ -19,6 +19,28 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> + <LinearLayout + android:id="@+id/fetch_post_error_linear_layout_post_fragment" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center" + android:orientation="vertical" + android:visibility="gone"> + + <ImageView + android:id="@+id/fetch_post_error_image_view_post_fragment" + android:layout_width="150dp" + android:layout_height="wrap_content" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:gravity="center" + android:text="@string/load_posts_error"/> + + </LinearLayout> + <!--<android.support.design.widget.FloatingActionButton android:id="@+id/fab_post_fragment" android:layout_width="wrap_content" |