Refactor from sliding uppanel to bottom sheet

This commit is contained in:
h4h13 2019-10-04 18:29:37 +05:30
parent 6f362e1ab7
commit a4f7c99f61
14 changed files with 241 additions and 142 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout 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/recentArtistContainer"
@ -7,28 +7,62 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<code.name.monkey.retromusic.views.RetroChip
android:id="@+id/chipHead"
style="@style/Widget.MaterialComponents.Chip.Action"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/titleContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/horizontal_padding_home"
android:layout_marginTop="12dp"
android:layout_marginEnd="@dimen/horizontal_padding_home"
android:layout_marginBottom="12dp"
android:textAppearance="@style/ChipFont"
android:textColor="?android:textColorSecondary"
app:chipIconTint="?iconColor"
app:chipStrokeColor="?dividerColor"
app:chipStrokeWidth="1dp"
app:iconStartPadding="8dp"
tools:chipIcon="@drawable/ic_person_white_24dp"
tools:text="@string/for_you" />
android:gravity="center_vertical"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingTop="12dp"
android:paddingEnd="16dp"
android:paddingBottom="12dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewHeadline6"
android:textStyle="bold"
tools:text="@tools:sample/full_names" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewCaption"
tools:text="@tools:sample/full_names" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:padding="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_keyboard_arrow_right_white_24dp"
app:tint="@color/ate_primary_text_light" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false" />
android:layout_marginTop="16dp"
android:nestedScrollingEnabled="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleContainer" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>