Separated Suggestions from Home sections

This commit is contained in:
Prathamesh More 2022-01-07 23:56:14 +05:30
parent 75cdf4d57f
commit 80f3926210
9 changed files with 114 additions and 122 deletions

View file

@ -12,7 +12,6 @@
~ See the GNU General Public License for more details.
-->
<LinearLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
@ -26,55 +25,26 @@
android:id="@+id/abs_playlists"
layout="@layout/abs_playlists" />
<FrameLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="24dp"
android:gravity="center_horizontal"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<include android:id="@+id/suggestions" layout="@layout/item_suggestions" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="96dp"
android:layout_height="96dp"
app:srcCompat="@drawable/ic_play_arrow_white_64dp"
app:tint="?attr/colorControlNormal" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/emptyText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/start_play_music"
android:textAppearance="@style/TextViewNormal"
android:textColor="?android:attr/textColorPrimary" />
</LinearLayout>
<LinearLayout
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:nestedScrollingEnabled="false"
android:overScrollMode="@integer/overScrollMode"
tools:itemCount="10"
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
tools:listitem="@layout/item_album_card"
tools:spanCount="3" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
android:overScrollMode="@integer/overScrollMode"
tools:itemCount="10"
tools:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
tools:listitem="@layout/item_album_card"
tools:spanCount="3" />
<Space
android:layout_width="match_parent"
android:layout_height="@dimen/mini_player_height_expanded" />
</LinearLayout>
</FrameLayout>
<Space
android:layout_width="match_parent"
android:layout_height="@dimen/mini_player_height_expanded" />
</LinearLayout>
</LinearLayout>

View file

@ -8,17 +8,27 @@
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?rectSelector"
android:padding="16dp"
android:text="@string/suggestion_songs"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<code.name.monkey.retromusic.views.AccentIcon
android:id="@+id/refresh_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
app:layout_constraintBottom_toTopOf="@+id/card7"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/round_selector"
app:srcCompat="@drawable/ic_refresh" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/card1"
@ -142,7 +152,7 @@
android:layout_height="match_parent"
android:autoSizeTextType="uniform"
android:padding="8dp"
android:text="New music mix"
android:text="@string/new_music_mix"
android:textAppearance="@style/TextViewNormal"
android:textSize="32sp"
android:textStyle="bold"