Refactor from sliding uppanel to bottom sheet
This commit is contained in:
parent
6f362e1ab7
commit
a4f7c99f61
14 changed files with 241 additions and 142 deletions
|
@ -33,9 +33,10 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorOnBackground"
|
||||
android:background="?colorPrimary"
|
||||
app:liftOnScroll="true">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
|
|
|
@ -34,9 +34,10 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorOnBackground"
|
||||
android:background="?colorPrimary"
|
||||
app:liftOnScroll="true">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
|
|
|
@ -35,9 +35,10 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorOnBackground"
|
||||
android:background="?colorPrimary"
|
||||
app:liftOnScroll="true">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<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="112dp"
|
||||
android:layout_width="106dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:orientation="vertical">
|
||||
|
@ -27,7 +27,6 @@
|
|||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:paddingTop="12dp"
|
||||
android:textAppearance="@style/TextViewNormal"
|
||||
android:textColor="?colorOnPrimary"
|
||||
tools:text="Name" />
|
||||
</LinearLayout>
|
|
@ -89,7 +89,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextViewBody2"
|
||||
android:textColor="?colorOnBackground"
|
||||
tools:text="Song artist name " />
|
||||
</LinearLayout>
|
||||
|
|
|
@ -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:layout_width="match_parent"
|
||||
|
@ -7,28 +7,61 @@
|
|||
android:orientation="vertical"
|
||||
android:paddingBottom="12dp">
|
||||
|
||||
<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_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="@dimen/horizontal_padding_home"
|
||||
android:layout_marginEnd="@dimen/horizontal_padding_home"
|
||||
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>
|
||||
|
||||
<code.name.monkey.retromusic.views.MetalRecyclerViewPager
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:itemMargin="28dp" />
|
||||
</LinearLayout>
|
||||
app:itemMargin="28dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/titleContainer" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -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>
|
|
@ -6,7 +6,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:sothree="http://schemas.android.com/apk/res-auto"
|
||||
<!--<com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:sothree="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/slidingLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -14,34 +14,40 @@
|
|||
sothree:umanoOverlay="false"
|
||||
sothree:umanoPanelHeight="0dp"
|
||||
sothree:umanoScrollableView="@+id/recycler_view"
|
||||
sothree:umanoShadowHeight="0dp">
|
||||
sothree:umanoShadowHeight="0dp">-->
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/mainContentFrame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/slidingPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:behavior_hideable="false"
|
||||
app:behavior_peekHeight="0dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/mainContentFrame"
|
||||
android:id="@+id/playerFragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/slidingPanel"
|
||||
<fragment
|
||||
android:id="@+id/miniPlayerFragment"
|
||||
android:name="code.name.monkey.retromusic.fragments.MiniPlayerFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="48dp"
|
||||
tools:layout="@layout/fragment_mini_player" />
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/playerFragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/miniPlayerFragment"
|
||||
android:name="code.name.monkey.retromusic.fragments.MiniPlayerFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
tools:layout="@layout/fragment_mini_player" />
|
||||
|
||||
</FrameLayout>
|
||||
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<!-- </com.sothree.slidinguppanel.SlidingUpPanelLayout>-->
|
||||
|
||||
<code.name.monkey.retromusic.views.BottomNavigationBarTinted
|
||||
android:id="@+id/bottomNavigationView"
|
||||
|
@ -50,7 +56,7 @@
|
|||
android:layout_gravity="bottom"
|
||||
android:background="?colorSecondary"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp"
|
||||
android:visibility="gone"
|
||||
app:itemIconTint="@drawable/bottom_navigation_item_colors"
|
||||
app:itemTextAppearanceActive="@style/BottomSheetItemTextAppearanceActive"
|
||||
app:itemTextAppearanceInactive="@style/BottomSheetItemTextAppearanceInactive"
|
||||
|
|
|
@ -659,4 +659,9 @@
|
|||
<string name="action_toggle_favorite">Toggle favorite</string>
|
||||
<string name="pref_dialog_corner_title">Dialog corner</string>
|
||||
<string name="peak">Peak</string>
|
||||
<string name="recent_added_artists">Recently added artists</string>
|
||||
<string name="recent_added_albums">Recently added albums</string>
|
||||
<string name="most_played_artists">Most played artists</string>
|
||||
<string name="most_played_albums">Most played albums</string>
|
||||
<string name="favorites_songs">You\'re most favorites songs</string>
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue