diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-08-14 22:51:26 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-08-14 22:51:26 +0000 |
commit | ea8f2404debddee1e0b2e1dbd0078647814fed9b (patch) | |
tree | f3c8816968a0eb880ede1cf22a56c6d81b149f14 /app/src/main/res/layout | |
parent | 1c821fbab41a21ec3d40f78436a78cc596692b28 (diff) | |
download | infinity-for-reddit-ea8f2404debddee1e0b2e1dbd0078647814fed9b.tar infinity-for-reddit-ea8f2404debddee1e0b2e1dbd0078647814fed9b.tar.gz infinity-for-reddit-ea8f2404debddee1e0b2e1dbd0078647814fed9b.tar.bz2 infinity-for-reddit-ea8f2404debddee1e0b2e1dbd0078647814fed9b.tar.lz infinity-for-reddit-ea8f2404debddee1e0b2e1dbd0078647814fed9b.tar.xz infinity-for-reddit-ea8f2404debddee1e0b2e1dbd0078647814fed9b.tar.zst infinity-for-reddit-ea8f2404debddee1e0b2e1dbd0078647814fed9b.zip |
Redesign recent search queries UI.
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/activity_search.xml | 12 | ||||
-rw-r--r-- | app/src/main/res/layout/item_recent_search_query.xml | 58 |
2 files changed, 41 insertions, 29 deletions
diff --git a/app/src/main/res/layout/activity_search.xml b/app/src/main/res/layout/activity_search.xml index 3427f7d3..ef6bee96 100644 --- a/app/src/main/res/layout/activity_search.xml +++ b/app/src/main/res/layout/activity_search.xml @@ -122,14 +122,16 @@ </RelativeLayout> - <View - android:id="@+id/divider_search_activity" + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/recent_search_query_recycler_view_search_activity" android:layout_width="match_parent" - android:layout_height="1dp" - android:visibility="gone" /> + android:layout_height="wrap_content" + android:visibility="gone" + app:spanCount="2" + app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" /> <androidx.recyclerview.widget.RecyclerView - android:id="@+id/recycler_view_search_activity" + android:id="@+id/subreddit_autocomplete_recycler_view_search_activity" android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone" diff --git a/app/src/main/res/layout/item_recent_search_query.xml b/app/src/main/res/layout/item_recent_search_query.xml index e23e7378..dc732c03 100644 --- a/app/src/main/res/layout/item_recent_search_query.xml +++ b/app/src/main/res/layout/item_recent_search_query.xml @@ -1,33 +1,43 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" - xmlns:app="http://schemas.android.com/apk/res-auto" + app:cardCornerRadius="12dp" android:clickable="true" android:focusable="true" - android:background="?attr/selectableItemBackground"> + style="?attr/materialCardViewFilledStyle"> - <TextView - android:id="@+id/recent_search_query_text_view_item_recent_search_query" - android:layout_width="0dp" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:layout_gravity="center_vertical" - android:gravity="center_vertical" - android:fontFamily="?attr/font_family" - android:textSize="?attr/font_default" - android:padding="16dp" - android:drawablePadding="16dp" /> + android:orientation="vertical"> - <com.google.android.material.button.MaterialButton - android:id="@+id/delete_button_item_recent_search_query" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:padding="16dp" - app:strokeWidth="0dp" - app:iconSize="24dp" - app:iconTint="@null" - style="?attr/materialIconButtonOutlinedStyle" /> + <TextView + android:id="@+id/recent_search_query_text_view_item_recent_search_query" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="16dp" + android:fontFamily="?attr/font_family" + android:textSize="?attr/font_default" + android:singleLine="true" + android:ellipsize="marquee" + android:marqueeRepeatLimit="marquee_forever" /> + + <TextView + android:id="@+id/recent_search_query_where_text_view_item_recent_search_query" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + android:fontFamily="?attr/font_family" + android:textSize="?attr/font_default" + android:singleLine="true" + android:ellipsize="marquee" + android:marqueeRepeatLimit="marquee_forever" + android:visibility="gone" /> + + </LinearLayout> -</LinearLayout>
\ No newline at end of file +</com.google.android.material.card.MaterialCardView> |