2020-11-20 15:38:08 +01:00
|
|
|
<?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"
|
|
|
|
|
android:layout_width="match_parent"
|
2020-12-05 21:31:12 +01:00
|
|
|
android:layout_height="match_parent">
|
2020-11-20 15:38:08 +01:00
|
|
|
|
|
|
|
|
<com.paulrybitskyi.persistentsearchview.PersistentSearchView
|
|
|
|
|
android:id="@+id/persistentSearchView"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2020-11-21 13:54:49 +01:00
|
|
|
android:paddingStart="8dp"
|
|
|
|
|
android:paddingTop="8dp"
|
|
|
|
|
android:paddingEnd="8dp"
|
2020-11-25 15:12:07 +01:00
|
|
|
app:areSuggestionsDisabled="false"
|
2020-11-20 15:38:08 +01:00
|
|
|
app:cardBackgroundColor="@color/cardColor"
|
|
|
|
|
app:cardCornerRadius="4dp"
|
2020-11-25 08:21:30 +01:00
|
|
|
app:cardElevation="2dp"
|
2020-11-20 15:38:08 +01:00
|
|
|
app:clearInputButtonDrawable="@drawable/ic_close"
|
|
|
|
|
app:dividerColor="@color/dividerColor"
|
|
|
|
|
app:isClearInputButtonEnabled="true"
|
|
|
|
|
app:isDismissableOnTouchOutside="true"
|
|
|
|
|
app:isProgressBarEnabled="true"
|
2020-11-21 13:54:49 +01:00
|
|
|
app:isVoiceInputButtonEnabled="false"
|
2020-11-20 15:38:08 +01:00
|
|
|
app:leftButtonDrawable="@drawable/ic_search"
|
|
|
|
|
app:progressBarColor="@color/colorAccent"
|
|
|
|
|
app:queryInputBarIconColor="@color/darkIconColor"
|
|
|
|
|
app:queryInputCursorColor="@color/colorAccent"
|
|
|
|
|
app:queryInputHint="@string/search_hint"
|
|
|
|
|
app:queryInputHintColor="@color/hintTextColor"
|
|
|
|
|
app:queryInputTextColor="@color/hintTextColor"
|
2020-11-25 15:12:07 +01:00
|
|
|
app:shouldDimBehind="true"
|
|
|
|
|
|
|
|
|
|
app:suggestionIconColor="@color/suggestionIconColor"
|
|
|
|
|
app:suggestionRecentSearchIconColor="@color/suggestionIconColor"
|
|
|
|
|
app:suggestionSearchSuggestionIconColor="@color/suggestionIconColor"
|
|
|
|
|
app:suggestionTextColor="@color/suggestionTextColor"
|
|
|
|
|
app:suggestionSelectedTextColor="@color/suggestionSelectedTextColor" />
|
2020-11-20 15:38:08 +01:00
|
|
|
|
2020-11-21 13:54:49 +01:00
|
|
|
<LinearLayout
|
2020-11-20 15:38:08 +01:00
|
|
|
android:layout_width="match_parent"
|
2020-11-21 13:54:49 +01:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_below="@id/persistentSearchView"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<!-- Recent searched -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<!-- Label and button -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:paddingStart="8dp"
|
|
|
|
|
android:paddingTop="8dp"
|
|
|
|
|
android:paddingEnd="8dp">
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:fontFamily="@font/open_sans_font_family"
|
|
|
|
|
android:paddingStart="8dp"
|
|
|
|
|
android:paddingTop="12dp"
|
|
|
|
|
android:paddingBottom="8dp"
|
|
|
|
|
android:paddingEnd="8dp"
|
|
|
|
|
android:text="Recent Searches"
|
|
|
|
|
android:textColor="@color/titleTextColor"
|
|
|
|
|
android:textSize="22sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/clear_all_search_text_view_clickable"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:fontFamily="@font/open_sans_font_family"
|
|
|
|
|
android:paddingStart="8dp"
|
|
|
|
|
android:paddingTop="12dp"
|
|
|
|
|
android:paddingEnd="8dp"
|
|
|
|
|
android:text="Clear all"
|
|
|
|
|
android:textColor="@color/subtitleTextColor"
|
|
|
|
|
android:textSize="14sp" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
|
android:id="@+id/recently_searched_tracks_recycler_view"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_marginBottom="4dp"
|
|
|
|
|
android:clipToPadding="false"
|
|
|
|
|
android:paddingStart="8dp"
|
|
|
|
|
android:paddingTop="4dp"
|
|
|
|
|
android:paddingEnd="8dp" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
2020-11-22 19:11:38 +01:00
|
|
|
<androidx.core.widget.NestedScrollView
|
|
|
|
|
android:id="@+id/search_result_nested_scroll_view"
|
2020-11-21 13:54:49 +01:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2020-12-05 21:31:12 +01:00
|
|
|
android:visibility="gone"
|
|
|
|
|
android:paddingBottom="@dimen/global_padding_bottom">
|
2020-11-21 13:54:49 +01:00
|
|
|
|
2020-11-22 19:11:38 +01:00
|
|
|
<!-- Search result -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/search_result_layout"
|
|
|
|
|
android:layout_width="match_parent"
|
2020-11-21 13:54:49 +01:00
|
|
|
android:layout_height="wrap_content"
|
2020-11-22 19:11:38 +01:00
|
|
|
android:orientation="vertical">
|
2020-11-21 13:54:49 +01:00
|
|
|
|
2020-11-24 10:52:00 +01:00
|
|
|
<!-- Label -->
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:fontFamily="@font/open_sans_font_family"
|
|
|
|
|
android:paddingStart="16dp"
|
|
|
|
|
android:paddingTop="8dp"
|
|
|
|
|
android:paddingEnd="8dp"
|
|
|
|
|
android:text="Search results"
|
|
|
|
|
android:textColor="@color/titleTextColor"
|
|
|
|
|
android:textSize="22sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
2020-11-22 19:11:38 +01:00
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:fontFamily="@font/open_sans_font_family"
|
|
|
|
|
android:paddingStart="16dp"
|
|
|
|
|
android:paddingTop="8dp"
|
|
|
|
|
android:paddingEnd="8dp"
|
|
|
|
|
android:text="Songs"
|
|
|
|
|
android:textColor="@color/titleTextColor"
|
|
|
|
|
android:textSize="18sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
|
android:id="@+id/search_result_tracks_recycler_view"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_marginTop="4dp"
|
|
|
|
|
android:clipToPadding="false"
|
|
|
|
|
android:overScrollMode="never"
|
|
|
|
|
android:paddingTop="8dp"
|
|
|
|
|
android:paddingBottom="24dp" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:fontFamily="@font/open_sans_font_family"
|
|
|
|
|
android:paddingStart="16dp"
|
|
|
|
|
android:paddingTop="8dp"
|
|
|
|
|
android:paddingEnd="8dp"
|
|
|
|
|
android:text="Albums"
|
|
|
|
|
android:textColor="@color/titleTextColor"
|
|
|
|
|
android:textSize="18sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
|
android:id="@+id/search_result_album_recycler_view"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_marginTop="4dp"
|
|
|
|
|
android:clipToPadding="false"
|
|
|
|
|
android:overScrollMode="never"
|
|
|
|
|
android:paddingStart="16dp"
|
|
|
|
|
android:paddingTop="8dp"
|
|
|
|
|
android:paddingEnd="8dp"
|
|
|
|
|
android:paddingBottom="16dp" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:fontFamily="@font/open_sans_font_family"
|
|
|
|
|
android:paddingStart="16dp"
|
|
|
|
|
android:paddingEnd="8dp"
|
|
|
|
|
android:paddingTop="8dp"
|
|
|
|
|
android:text="Artists"
|
|
|
|
|
android:textColor="@color/titleTextColor"
|
|
|
|
|
android:textSize="18sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
|
android:id="@+id/search_result_artist_recycler_view"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_marginTop="4dp"
|
|
|
|
|
android:clipToPadding="false"
|
|
|
|
|
android:overScrollMode="never"
|
|
|
|
|
android:paddingStart="16dp"
|
|
|
|
|
android:paddingTop="8dp"
|
|
|
|
|
android:paddingEnd="8dp"
|
|
|
|
|
android:paddingBottom="56dp" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
2020-11-21 13:54:49 +01:00
|
|
|
</LinearLayout>
|
2020-11-20 15:38:08 +01:00
|
|
|
</RelativeLayout>
|