Display meta info about search query, stream creator or topic

Closes #4614
This commit is contained in:
TobiGr 2020-12-15 17:41:21 +01:00 committed by Stypox
parent 202cc33a57
commit a88d3a8a68
10 changed files with 200 additions and 18 deletions

View file

@ -506,6 +506,38 @@
</LinearLayout>
<View
android:id="@+id/detail_metadata_info_separator"
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:background="?attr/separator_color" />
<LinearLayout
android:id="@+id/detail_metadata_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:srcCompat="?attr/ic_info_outline" />
<TextView
android:id="@+id/detail_metadata_info_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
tools:text="Stream meta info with link"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"

View file

@ -11,15 +11,25 @@
android:layout_height="wrap_content"
android:layout_alignTop="@id/error_panel"
android:background="?attr/selectableItemBackground"
android:padding="10dp"
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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/correct_suggestion"
android:padding="12dp"
android:textSize="@dimen/search_suggestion_text_size"
tools:text="Get the latest information from the WHO about coronavirus." />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/items_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/correct_suggestion"
android:layout_below="@+id/search_meta_info"
android:scrollbars="vertical"
app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/list_stream_item" />

View file

@ -491,6 +491,39 @@
</LinearLayout>
<View
android:id="@+id/detail_metadata_info_separator"
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:background="?attr/separator_color" />
<LinearLayout
android:id="@+id/detail_metadata_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
app:srcCompat="?attr/ic_info_outline" />
<TextView
android:id="@+id/detail_metadata_info_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
tools:text="Stream meta info with link"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"

View file

@ -197,6 +197,7 @@
<string name="show_play_with_kodi_key" translatable="false">show_play_with_kodi</string>
<string name="show_next_video_key" translatable="false">show_next_video</string>
<string name="show_comments_key" translatable="false">show_comments</string>
<string name="show_meta_info_key" translatable="false">show_meta_info</string>
<string name="stream_info_selected_tab_key" translatable="false">stream_info_selected_tab</string>
<string name="show_hold_to_append_key" translatable="false">show_hold_to_append</string>
<string name="content_language_key" translatable="false">content_language</string>

View file

@ -93,6 +93,8 @@
<string name="show_comments_title">Show comments</string>
<string name="show_comments_summary">Turn off to hide comments</string>
<string name="download_thumbnail_summary">Turn off to prevent loading thumbnails, saving data and memory usage. Changes clear both in-memory and on-disk image cache.</string>
<string name="show_meta_info_title">Show meta info</string>
<string name="show_meta_info_summary">Turn off to hide meta info boxes with additional information about the stream creator, stream content or a search request.</string>
<string name="thumbnail_cache_wipe_complete_notice">Image cache wiped</string>
<string name="metadata_cache_wipe_title">Wipe cached metadata</string>
<string name="metadata_cache_wipe_summary">Remove all cached webpage data</string>

View file

@ -85,6 +85,13 @@
android:title="@string/show_comments_title"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:key="@string/show_meta_info_key"
android:summary="@string/show_meta_info_summary"
android:title="@string/show_meta_info_title"
app:iconSpaceReserved="false" />
<Preference
android:key="@string/import_data"
android:summary="@string/import_data_summary"