Improve meta info layout and merge duplicate code

This commit is contained in:
Stypox 2020-12-20 15:05:37 +01:00
parent a88d3a8a68
commit 15bf6b82e2
7 changed files with 120 additions and 133 deletions

View file

@ -507,36 +507,21 @@
</LinearLayout>
<View
android:id="@+id/detail_metadata_info_separator"
android:id="@+id/detail_meta_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"
<TextView
android:id="@+id/detail_meta_info_text_view"
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>
android:gravity="center"
android:padding="12dp"
android:textSize="@dimen/video_item_detail_description_text_size"
tools:text="Stream meta info with link" />
<View
android:layout_width="match_parent"

View file

@ -16,20 +16,29 @@
tools:text="Showing results for lorem ipsum dolor sit amet consectetur adipisci elit" />
<TextView
android:id="@+id/search_meta_info"
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/search_suggestion_text_size"
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"
android:layout_below="@+id/search_meta_info_separator"
android:scrollbars="vertical"
app:layoutManager="LinearLayoutManager"
tools:listitem="@layout/list_stream_item" />

View file

@ -492,37 +492,21 @@
</LinearLayout>
<View
android:id="@+id/detail_metadata_info_separator"
android:id="@+id/detail_meta_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"
<TextView
android:id="@+id/detail_meta_info_text_view"
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>
android:gravity="center"
android:padding="12dp"
android:textSize="@dimen/video_item_detail_description_text_size"
tools:text="Stream meta info with link" />
<View
android:layout_width="match_parent"