c43bca6007
It will be shown even when nothing could be loaded not due to a network error, and the user can choose to ignore or report it. Also improve error reporting arguments Also completely refactor error activity Also improve some code here and there
121 lines
4.5 KiB
XML
121 lines
4.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<TextView
|
|
android:id="@+id/correct_suggestion"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignTop="@id/error_panel"
|
|
android:background="?attr/selectableItemBackground"
|
|
android:padding="12dp"
|
|
android:textSize="@dimen/search_suggestion_text_size"
|
|
tools:text="Showing results for lorem ipsum dolor sit amet consectetur adipisci elit" />
|
|
|
|
<TextView
|
|
android:id="@+id/search_meta_info_text_view"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@id/correct_suggestion"
|
|
android:gravity="center"
|
|
android:padding="12dp"
|
|
android:textSize="@dimen/video_item_detail_description_text_size"
|
|
tools:text="Get the latest information from the WHO about coronavirus." />
|
|
|
|
<View
|
|
android:id="@+id/search_meta_info_separator"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1px"
|
|
android:layout_below="@id/search_meta_info_text_view"
|
|
android:layout_marginLeft="8dp"
|
|
android:layout_marginRight="8dp"
|
|
android:background="?attr/separator_color" />
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/items_list"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_below="@+id/search_meta_info_separator"
|
|
android:scrollbars="vertical"
|
|
app:layoutManager="LinearLayoutManager"
|
|
tools:listitem="@layout/list_stream_item" />
|
|
|
|
<ProgressBar
|
|
android:id="@+id/loading_progress_bar"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerInParent="true"
|
|
android:indeterminate="true"
|
|
android:visibility="gone"
|
|
tools:visibility="visible" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/empty_state_view"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerInParent="true"
|
|
android:orientation="vertical"
|
|
android:visibility="gone"
|
|
tools:visibility="visible">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginBottom="10dp"
|
|
android:fontFamily="monospace"
|
|
android:text="╰(°●°╰)"
|
|
android:textSize="35sp"
|
|
tools:ignore="HardcodedText,UnusedAttribute" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:text="@string/search_no_results"
|
|
android:textSize="24sp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/suggestions_panel"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="?android:attr/windowBackground"
|
|
android:focusable="true"
|
|
android:focusableInTouchMode="true"
|
|
android:orientation="vertical"
|
|
android:visibility="gone"
|
|
tools:background="@android:color/transparent"
|
|
tools:visibility="visible">
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/suggestions_list"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:scrollbars="vertical"
|
|
app:layoutManager="LinearLayoutManager"
|
|
tools:listitem="@layout/item_search_suggestion" />
|
|
</LinearLayout>
|
|
|
|
<!--ERROR PANEL-->
|
|
<include
|
|
android:id="@+id/error_panel"
|
|
layout="@layout/error_panel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerHorizontal="true"
|
|
android:layout_marginTop="50dp"
|
|
android:visibility="gone"
|
|
tools:visibility="visible" />
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="4dp"
|
|
android:layout_alignParentTop="true"
|
|
android:background="?attr/toolbar_shadow" />
|
|
|
|
</RelativeLayout>
|