diff options
author | Alex Ning <chineseperson5@gmail.com> | 2018-12-29 05:38:18 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2018-12-29 05:38:18 +0000 |
commit | b7e1d92c7e45ee1b14ff53baebeb8af8dc6bbb5d (patch) | |
tree | 834a4053ee4379e32e4cd40f1bd348518cec1ac3 /app/src/main/res/layout | |
parent | 93a9ad9ece6df6cd210ca03be26bd74a760cb90f (diff) | |
download | infinity-for-reddit-b7e1d92c7e45ee1b14ff53baebeb8af8dc6bbb5d.tar infinity-for-reddit-b7e1d92c7e45ee1b14ff53baebeb8af8dc6bbb5d.tar.gz infinity-for-reddit-b7e1d92c7e45ee1b14ff53baebeb8af8dc6bbb5d.tar.bz2 infinity-for-reddit-b7e1d92c7e45ee1b14ff53baebeb8af8dc6bbb5d.tar.lz infinity-for-reddit-b7e1d92c7e45ee1b14ff53baebeb8af8dc6bbb5d.tar.xz infinity-for-reddit-b7e1d92c7e45ee1b14ff53baebeb8af8dc6bbb5d.tar.zst infinity-for-reddit-b7e1d92c7e45ee1b14ff53baebeb8af8dc6bbb5d.zip |
Error handling for loading posts now works again. Don't show refresh button as an icon. Rewrite some code.
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/item_footer_error.xml | 28 | ||||
-rw-r--r-- | app/src/main/res/layout/item_footer_loading.xml | 15 | ||||
-rw-r--r-- | app/src/main/res/layout/item_footer_progress_bar.xml | 47 |
3 files changed, 43 insertions, 47 deletions
diff --git a/app/src/main/res/layout/item_footer_error.xml b/app/src/main/res/layout/item_footer_error.xml new file mode 100644 index 00000000..bd653604 --- /dev/null +++ b/app/src/main/res/layout/item_footer_error.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/relative_layout_footer_progress_bar_item" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="8dp" + android:layout_marginEnd="16dp" + android:layout_marginBottom="16dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_centerVertical="true" + android:layout_toStartOf="@id/retry_button_footer_progress_bar_item" + android:text="@string/load_data_failed" + android:textSize="18sp" /> + + <Button + android:id="@+id/retry_button_footer_progress_bar_item" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_centerVertical="true" + android:text="@string/retry" /> + +</RelativeLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_footer_loading.xml b/app/src/main/res/layout/item_footer_loading.xml new file mode 100644 index 00000000..7cd0d8f2 --- /dev/null +++ b/app/src/main/res/layout/item_footer_loading.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <ProgressBar + android:id="@+id/progress_bar_footer_progress_bar_item" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:layout_marginBottom="16dp" + android:layout_centerHorizontal="true" /> + +</RelativeLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_footer_progress_bar.xml b/app/src/main/res/layout/item_footer_progress_bar.xml deleted file mode 100644 index 270fc6ef..00000000 --- a/app/src/main/res/layout/item_footer_progress_bar.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:id="@+id/linear_layout_footer_progress_bar_item" - android:orientation="vertical"> - - <ProgressBar - android:id="@+id/progress_bar_footer_progress_bar_item" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:layout_marginBottom="16dp" - android:layout_gravity="center" /> - - <RelativeLayout - android:id="@+id/relative_layout_footer_progress_bar_item" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:layout_marginBottom="16dp" - android:layout_marginStart="16dp" - android:layout_marginEnd="16dp" - android:visibility="gone"> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_toStartOf="@id/retry_button_footer_progress_bar_item" - android:layout_alignParentStart="true" - android:text="@string/load_data_failed" - android:textSize="18sp" - android:layout_centerVertical="true" /> - - <Button - android:id="@+id/retry_button_footer_progress_bar_item" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_centerVertical="true" - android:background="@color/colorAccent" - android:text="@string/retry" /> - - </RelativeLayout> - -</LinearLayout>
\ No newline at end of file |