Fix filtering

This commit is contained in:
Antonio Cappiello 2020-11-25 08:21:30 +01:00
parent 76037e487b
commit 4848d4f3d0
25 changed files with 575 additions and 124 deletions

View file

@ -28,17 +28,40 @@
android:orientation="vertical"
android:paddingBottom="8dp">
<TextView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/open_sans_font_family"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:text="Filter"
android:textColor="@color/titleTextColor"
android:textSize="22sp"
android:textStyle="bold" />
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:paddingEnd="8dp"
android:text="Filter"
android:textColor="@color/titleTextColor"
android:textSize="22sp"
android:textStyle="bold" />
<TextView
android:id="@+id/finish_filtering_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="Finish"
android:textColor="@color/subtitleTextColor"
android:textSize="14sp" />
</LinearLayout>
<com.google.android.material.chip.ChipGroup
android:id="@+id/filters_chips_group"

View file

@ -28,17 +28,41 @@
android:orientation="vertical"
android:paddingBottom="8dp">
<TextView
<!-- Label and button -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/open_sans_font_family"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:text="Genre Catalogue"
android:textColor="@color/titleTextColor"
android:textSize="22sp"
android:textStyle="bold" />
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:paddingEnd="8dp"
android:text="Genre Catalogue"
android:textColor="@color/titleTextColor"
android:textSize="22sp"
android:textStyle="bold" />
<TextView
android:id="@+id/filter_genres_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="Filter"
android:textColor="@color/subtitleTextColor"
android:textSize="14sp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/genre_catalogue_recycler_view"

View file

@ -194,8 +194,21 @@
android:clipToPadding="false"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp" />
android:paddingEnd="8dp"/>
<Button
android:id="@+id/sync_genre_button"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="16dp"
android:paddingBottom="12dp"
android:text="Sync Genres"
android:textAllCaps="false"
android:textColor="@color/normalTextColor"
app:cornerRadius="24dp" />
</LinearLayout>
</LinearLayout>

View file

@ -14,7 +14,7 @@
app:areSuggestionsDisabled="true"
app:cardBackgroundColor="@color/cardColor"
app:cardCornerRadius="4dp"
app:cardElevation="0dp"
app:cardElevation="2dp"
app:clearInputButtonDrawable="@drawable/ic_close"
app:dividerColor="@color/dividerColor"
app:isClearInputButtonEnabled="true"
@ -28,7 +28,6 @@
app:queryInputHint="@string/search_hint"
app:queryInputHintColor="@color/hintTextColor"
app:queryInputTextColor="@color/hintTextColor"
app:rightButtonDrawable="@drawable/ic_filter"
app:shouldDimBehind="false" />
<LinearLayout

View file

@ -40,7 +40,7 @@
<action
android:id="@+id/action_loginFragment_to_homeFragment"
app:destination="@id/homeFragment"
app:popUpTo="@id/landingFragment"
app:popUpTo="@id/loginFragment"
app:popUpToInclusive="true" />
</fragment>
@ -91,6 +91,11 @@
<action
android:id="@+id/action_libraryFragment_to_songListPageFragment"
app:destination="@id/songListPageFragment" />
<action
android:id="@+id/action_libraryFragment_to_syncFragment"
app:destination="@id/syncFragment"
app:popUpTo="@id/libraryFragment"
app:popUpToInclusive="true" />
</fragment>
<fragment
android:id="@+id/settingsFragment"
@ -102,9 +107,6 @@
android:name="com.cappielloantonio.play.ui.fragment.SearchFragment"
android:label="SearchFragment"
tools:layout="@layout/fragment_search">
<action
android:id="@+id/action_searchFragment_to_filterFragment"
app:destination="@id/filterFragment" />
<action
android:id="@+id/action_searchFragment_to_artistPageFragment"
app:destination="@id/artistPageFragment"/>
@ -116,7 +118,11 @@
android:id="@+id/filterFragment"
android:name="com.cappielloantonio.play.ui.fragment.FilterFragment"
android:label="FilterFragment"
tools:layout="@layout/fragment_filter" />
tools:layout="@layout/fragment_filter" >
<action
android:id="@+id/action_filterFragment_to_songListPageFragment"
app:destination="@id/songListPageFragment" />
</fragment>
<fragment
android:id="@+id/artistCatalogueFragment"
android:name="com.cappielloantonio.play.ui.fragment.ArtistCatalogueFragment"
@ -143,6 +149,9 @@
<action
android:id="@+id/action_genreCatalogueFragment_to_songListPageFragment"
app:destination="@id/songListPageFragment" />
<action
android:id="@+id/action_genreCatalogueFragment_to_filterFragment"
app:destination="@id/filterFragment" />
</fragment>
<fragment

View file

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph"
app:startDestination="@id/landingFragment">
<fragment
android:id="@+id/landingFragment"
android:name="com.cappielloantonio.play.ui.fragment.LandingFragment"
android:label="fragment_landing"
tools:layout="@layout/fragment_landing" >
<action
android:id="@+id/action_landingFragment_to_loginFragment"
app:destination="@id/loginFragment"
app:popUpTo="@id/landingFragment"
app:popUpToInclusive="true" />
<action
android:id="@+id/action_landingFragment_to_homeFragment"
app:destination="@id/homeFragment"
app:popUpTo="@id/landingFragment"
app:popUpToInclusive="true" />
<action
android:id="@+id/action_landingFragment_to_syncFragment"
app:destination="@id/syncFragment"
app:popUpTo="@id/landingFragment"
app:popUpToInclusive="true" />
</fragment>
<fragment
android:id="@+id/loginFragment"
android:name="com.cappielloantonio.play.ui.fragment.LoginFragment"
android:label="LoginFragment"
tools:layout="@layout/fragment_login">
<action
android:id="@+id/action_loginFragment_to_syncFragment"
app:destination="@id/syncFragment"
app:popUpTo="@id/loginFragment"
app:popUpToInclusive="true" />
<action
android:id="@+id/action_loginFragment_to_homeFragment"
app:destination="@id/homeFragment"
app:popUpTo="@id/loginFragment"
app:popUpToInclusive="true" />
</fragment>
<fragment
android:id="@+id/syncFragment"
android:name="com.cappielloantonio.play.ui.fragment.SyncFragment"
android:label="SyncFragment"
tools:layout="@layout/fragment_sync">
<action
android:id="@+id/action_syncFragment_to_homeFragment"
app:destination="@id/homeFragment"
app:popUpTo="@id/syncFragment"
app:popUpToInclusive="true" />
</fragment>
<fragment
android:id="@+id/homeFragment"
android:name="com.cappielloantonio.play.ui.fragment.HomeFragment"
android:label="HomeFragment"
tools:layout="@layout/fragment_home">
<action
android:id="@+id/action_homeFragment_to_syncFragment"
app:destination="@id/syncFragment" />
<action
android:id="@+id/action_homeFragment_to_songListPageFragment"
app:destination="@id/songListPageFragment" />
</fragment>
<fragment
android:id="@+id/songListPageFragment"
android:name="com.cappielloantonio.play.ui.fragment.SongListPageFragment"
android:label="SongListPageFragment"
tools:layout="@layout/fragment_song_list_page"/>
</navigation>

View file

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph">
<fragment
android:id="@+id/libraryFragment"
android:name="com.cappielloantonio.play.ui.fragment.LibraryFragment"
android:label="LibraryFragment"
tools:layout="@layout/fragment_library">
<action
android:id="@+id/action_libraryFragment_to_artistCatalogueFragment"
app:destination="@id/artistCatalogueFragment" />
<action
android:id="@+id/action_libraryFragment_to_albumCatalogueFragment"
app:destination="@id/albumCatalogueFragment" />
<action
android:id="@+id/action_libraryFragment_to_genreCatalogueFragment"
app:destination="@id/genreCatalogueFragment" />
<action
android:id="@+id/action_libraryFragment_to_artistPageFragment"
app:destination="@id/artistPageFragment"/>
<action
android:id="@+id/action_libraryFragment_to_albumPageFragment"
app:destination="@id/albumPageFragment" />
<action
android:id="@+id/action_libraryFragment_to_songListPageFragment"
app:destination="@id/songListPageFragment" />
</fragment>
<fragment
android:id="@+id/artistCatalogueFragment"
android:name="com.cappielloantonio.play.ui.fragment.ArtistCatalogueFragment"
android:label="ArtistCatalogueFragment"
tools:layout="@layout/fragment_artist_catalogue">
<action
android:id="@+id/action_artistCatalogueFragment_to_artistPageFragment"
app:destination="@id/artistPageFragment"/>
</fragment>
<fragment
android:id="@+id/albumCatalogueFragment"
android:name="com.cappielloantonio.play.ui.fragment.AlbumCatalogueFragment"
android:label="AlbumCatalogueFragment"
tools:layout="@layout/fragment_album_catalogue">
<action
android:id="@+id/action_albumCatalogueFragment_to_albumPageFragment"
app:destination="@id/albumPageFragment" />
</fragment>
<fragment
android:id="@+id/genreCatalogueFragment"
android:name="com.cappielloantonio.play.ui.fragment.GenreCatalogueFragment"
android:label="GenreCatalogueFragment"
tools:layout="@layout/fragment_genre_catalogue">
<action
android:id="@+id/action_genreCatalogueFragment_to_songListPageFragment"
app:destination="@id/songListPageFragment" />
</fragment>
<fragment
android:id="@+id/artistPageFragment"
android:name="com.cappielloantonio.play.ui.fragment.ArtistPageFragment"
android:label="ArtistPageFragment"
tools:layout="@layout/fragment_artist_page">
<action
android:id="@+id/action_artistPageFragment_to_albumPageFragment"
app:destination="@id/albumPageFragment" />
<action
android:id="@+id/action_artistPageFragment_to_songListPageFragment"
app:destination="@id/songListPageFragment" />
</fragment>
<fragment
android:id="@+id/albumPageFragment"
android:name="com.cappielloantonio.play.ui.fragment.AlbumPageFragment"
android:label="AlbumPageFragment"
tools:layout="@layout/fragment_album_page"/>
<fragment
android:id="@+id/songListPageFragment"
android:name="com.cappielloantonio.play.ui.fragment.SongListPageFragment"
android:label="SongListPageFragment"
tools:layout="@layout/fragment_song_list_page"/>
</navigation>

View file

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph">
<fragment
android:id="@+id/searchFragment"
android:name="com.cappielloantonio.play.ui.fragment.SearchFragment"
android:label="SearchFragment"
tools:layout="@layout/fragment_search">
<action
android:id="@+id/action_searchFragment_to_filterFragment"
app:destination="@id/filterFragment" />
<action
android:id="@+id/action_searchFragment_to_artistPageFragment"
app:destination="@id/artistPageFragment"/>
<action
android:id="@+id/action_searchFragment_to_albumPageFragment"
app:destination="@id/albumPageFragment" />
</fragment>
<fragment
android:id="@+id/filterFragment"
android:name="com.cappielloantonio.play.ui.fragment.FilterFragment"
android:label="FilterFragment"
tools:layout="@layout/fragment_filter" />
<fragment
android:id="@+id/artistPageFragment"
android:name="com.cappielloantonio.play.ui.fragment.ArtistPageFragment"
android:label="ArtistPageFragment"
tools:layout="@layout/fragment_artist_page">
<action
android:id="@+id/action_artistPageFragment_to_albumPageFragment"
app:destination="@id/albumPageFragment" />
<action
android:id="@+id/action_artistPageFragment_to_songListPageFragment"
app:destination="@id/songListPageFragment" />
</fragment>
<fragment
android:id="@+id/albumPageFragment"
android:name="com.cappielloantonio.play.ui.fragment.AlbumPageFragment"
android:label="AlbumPageFragment"
tools:layout="@layout/fragment_album_page"/>
<fragment
android:id="@+id/songListPageFragment"
android:name="com.cappielloantonio.play.ui.fragment.SongListPageFragment"
android:label="SongListPageFragment"
tools:layout="@layout/fragment_song_list_page"/>
</navigation>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph">
<fragment
android:id="@+id/settingsFragment"
android:name="com.cappielloantonio.play.ui.fragment.SettingsFragment"
android:label="SettingsFragment"
tools:layout="@layout/fragment_settings"/>
</navigation>

View file

@ -36,7 +36,7 @@
<color name="bottomNavIconColor">#707070</color>
<color name="chipBorderColor">#707070</color>
<color name="chipSelectedBackgroundColor">#444444</color>
<color name="chipSelectedBackgroundColor">#606060</color>
<color name="chipUnelectedBackgroundColor">#1D1D1D</color>
</resources>