Moved player toolbar for Blur Card theme to bottom
This commit is contained in:
parent
62372ec205
commit
0c6917c775
2 changed files with 73 additions and 54 deletions
|
@ -74,8 +74,8 @@ class CardBlurFragment : AbsPlayerFragment(R.layout.fragment_card_blur_player),
|
||||||
libraryViewModel.updateColor(color.backgroundColor)
|
libraryViewModel.updateColor(color.backgroundColor)
|
||||||
ToolbarContentTintHelper.colorizeToolbar(binding.playerToolbar, Color.WHITE, activity)
|
ToolbarContentTintHelper.colorizeToolbar(binding.playerToolbar, Color.WHITE, activity)
|
||||||
|
|
||||||
binding.playerToolbar.setTitleTextColor(Color.WHITE)
|
binding.title.setTextColor(Color.WHITE)
|
||||||
binding.playerToolbar.setSubtitleTextColor(Color.WHITE)
|
binding.text.setTextColor(Color.WHITE)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toggleFavorite(song: Song) {
|
override fun toggleFavorite(song: Song) {
|
||||||
|
@ -94,7 +94,7 @@ class CardBlurFragment : AbsPlayerFragment(R.layout.fragment_card_blur_player),
|
||||||
_binding = FragmentCardBlurPlayerBinding.bind(view)
|
_binding = FragmentCardBlurPlayerBinding.bind(view)
|
||||||
setUpSubFragments()
|
setUpSubFragments()
|
||||||
setUpPlayerToolbar()
|
setUpPlayerToolbar()
|
||||||
binding.cardContainer?.drawAboveSystemBars()
|
binding.playerToolbar.drawAboveSystemBars()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setUpSubFragments() {
|
private fun setUpSubFragments() {
|
||||||
|
@ -130,9 +130,9 @@ class CardBlurFragment : AbsPlayerFragment(R.layout.fragment_card_blur_player),
|
||||||
|
|
||||||
private fun updateSong() {
|
private fun updateSong() {
|
||||||
val song = MusicPlayerRemote.currentSong
|
val song = MusicPlayerRemote.currentSong
|
||||||
binding.playerToolbar.apply {
|
binding.run {
|
||||||
title = song.title
|
title.text = song.title
|
||||||
subtitle = song.artistName
|
text.text = song.artistName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,64 +25,83 @@
|
||||||
<include layout="@layout/shadow_statusbar_toolbar" />
|
<include layout="@layout/shadow_statusbar_toolbar" />
|
||||||
|
|
||||||
|
|
||||||
<FrameLayout
|
<LinearLayout
|
||||||
android:id="@+id/cardContainer"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<include layout="@layout/status_bar" />
|
||||||
android:layout_width="match_parent"
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:layout_marginTop="16dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:focusable="true"
|
||||||
|
android:freezesText="true"
|
||||||
|
android:paddingHorizontal="24dp"
|
||||||
|
android:scrollHorizontally="true"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/TextViewHeadline6"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="@tools:sample/lorem" />
|
||||||
|
|
||||||
<include layout="@layout/status_bar" />
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:focusable="true"
|
||||||
|
android:freezesText="true"
|
||||||
|
android:paddingHorizontal="24dp"
|
||||||
|
android:scrollHorizontally="true"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/TextViewBody1"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
tools:text="@tools:sample/lorem" />
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<FrameLayout
|
||||||
android:id="@+id/playerToolbar"
|
android:id="@+id/cardContainer"
|
||||||
style="@style/Toolbar"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/playerAlbumCoverFragment"
|
||||||
|
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:layout="@layout/fragment_album_full_card_cover" />
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/cover_lyrics"
|
||||||
|
android:name="code.name.monkey.retromusic.fragments.player.CoverLyricsFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
tools:layout="@layout/fragment_cover_lyrics" />
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/playbackControlsFragment"
|
||||||
|
android:name="code.name.monkey.retromusic.fragments.player.cardblur.CardBlurPlaybackControlsFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_gravity="bottom"
|
||||||
app:contentInsetLeft="0dp"
|
tools:layout="@layout/fragment_card_blur_player_playback_controls" />
|
||||||
app:contentInsetStart="0dp"
|
</FrameLayout>
|
||||||
app:contentInsetStartWithNavigation="0dp"
|
|
||||||
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black"
|
|
||||||
app:subtitleTextAppearance="@style/TextAppearance.AppCompat.Caption"
|
|
||||||
app:titleMargin="0dp"
|
|
||||||
app:titleMarginStart="0dp"
|
|
||||||
app:titleTextAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
|
||||||
|
|
||||||
<FrameLayout
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/playerToolbar"
|
||||||
android:layout_height="wrap_content"
|
style="@style/Toolbar"
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/playerAlbumCoverFragment"
|
|
||||||
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
tools:layout="@layout/fragment_album_card_cover" />
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/cover_lyrics"
|
|
||||||
android:name="code.name.monkey.retromusic.fragments.player.CoverLyricsFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
tools:layout="@layout/fragment_cover_lyrics" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/playbackControlsFragment"
|
|
||||||
android:name="code.name.monkey.retromusic.fragments.player.cardblur.CardBlurPlaybackControlsFragment"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
tools:layout="@layout/fragment_card_blur_player_playback_controls" />
|
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black" />
|
||||||
</FrameLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
Loading…
Add table
Add a link
Reference in a new issue