diff options
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/activity_search.xml | 74 | ||||
-rw-r--r-- | app/src/main/res/layout/item_recent_search_query.xml | 19 |
2 files changed, 69 insertions, 24 deletions
diff --git a/app/src/main/res/layout/activity_search.xml b/app/src/main/res/layout/activity_search.xml index 0048e1fc..972ba2af 100644 --- a/app/src/main/res/layout/activity_search.xml +++ b/app/src/main/res/layout/activity_search.xml @@ -48,38 +48,64 @@ android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> - <RelativeLayout - android:id="@+id/subreddit_name_relative_layout_search_activity" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/selectableItemBackground" - android:clickable="true" - android:focusable="true" - android:padding="16dp"> + android:orientation="vertical"> - <TextView - android:id="@+id/search_in_text_view_search_activity" - android:layout_width="wrap_content" + <RelativeLayout + android:id="@+id/subreddit_name_relative_layout_search_activity" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/search_in" - android:textColor="?attr/colorAccent" - android:textSize="?attr/font_default" - android:fontFamily="?attr/font_family" /> + android:background="?attr/selectableItemBackground" + android:clickable="true" + android:focusable="true" + android:padding="16dp"> + + <TextView + android:id="@+id/search_in_text_view_search_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/search_in" + android:textColor="?attr/colorAccent" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" /> + + <TextView + android:id="@+id/subreddit_name_text_view_search_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_marginStart="32dp" + android:layout_marginEnd="16dp" + android:layout_toEndOf="@id/search_in_text_view_search_activity" + android:text="@string/all_subreddits" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" /> + + </RelativeLayout> + + <View + android:id="@+id/divider_search_activity" + android:layout_width="match_parent" + android:layout_height="1dp" /> <TextView - android:id="@+id/subreddit_name_text_view_search_activity" + android:id="@+id/recent_summary_text_view_search_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_marginStart="32dp" - android:layout_marginEnd="16dp" - android:layout_toEndOf="@id/search_in_text_view_search_activity" - android:text="@string/all_subreddits" - android:textColor="?attr/primaryTextColor" - android:textSize="?attr/font_default" - android:fontFamily="?attr/font_family" /> - - </RelativeLayout> + android:padding="16dp" + android:text="@string/recent_searches" + android:fontFamily="?attr/font_family" + android:visibility="gone" /> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/recycler_view_search_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + </LinearLayout> </androidx.core.widget.NestedScrollView> diff --git a/app/src/main/res/layout/item_recent_search_query.xml b/app/src/main/res/layout/item_recent_search_query.xml new file mode 100644 index 00000000..f014e2fe --- /dev/null +++ b/app/src/main/res/layout/item_recent_search_query.xml @@ -0,0 +1,19 @@ +<?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:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground"> + + <TextView + android:id="@+id/recent_search_query_text_view_item_recent_search_query" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="?attr/font_family" + android:textSize="?attr/font_default" + android:drawablePadding="16dp" /> + +</LinearLayout>
\ No newline at end of file |