Fix 16:9 screen now playing themes

This commit is contained in:
Hemanth S 2020-05-12 03:54:09 +05:30
parent 600fd1952a
commit c00895d094
14 changed files with 438 additions and 453 deletions

View file

@ -24,8 +24,8 @@ android {
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic" applicationId "code.name.monkey.retromusic"
versionCode 426 versionCode 428
versionName '3.5.210' versionName '3.5.300'
multiDexEnabled true multiDexEnabled true

View file

@ -156,13 +156,6 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
hideStatusBar(); hideStatusBar();
setBottomBarVisibility(View.VISIBLE); setBottomBarVisibility(View.VISIBLE);
getBottomNavigationView().setSelectedItemId(PreferenceUtil.getInstance(this).getLastPage());
getBottomNavigationView().setOnNavigationItemSelectedListener(item -> {
PreferenceUtil.getInstance(MainActivity.this).setLastPage(item.getItemId());
selectedFragment(item.getItemId());
return true;
});
if (savedInstanceState == null) { if (savedInstanceState == null) {
selectedFragment(PreferenceUtil.getInstance(this).getLastPage()); selectedFragment(PreferenceUtil.getInstance(this).getLastPage());
} else { } else {
@ -178,6 +171,12 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
setupToolbar(); setupToolbar();
checkUpdate(); checkUpdate();
updateTabs(); updateTabs();
getBottomNavigationView().setSelectedItemId(PreferenceUtil.getInstance(this).getLastPage());
getBottomNavigationView().setOnNavigationItemSelectedListener(item -> {
PreferenceUtil.getInstance(MainActivity.this).setLastPage(item.getItemId());
selectedFragment(item.getItemId());
return true;
});
} }

View file

@ -55,7 +55,6 @@ class ClassicPlayerFragment : AbsPlayerFragment(), View.OnLayoutChangeListener,
private var lastPlaybackControlsColor: Int = 0 private var lastPlaybackControlsColor: Int = 0
private var lastDisabledPlaybackControlsColor: Int = 0 private var lastDisabledPlaybackControlsColor: Int = 0
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
private lateinit var queueAdapter: PlayingQueueAdapter
private var volumeFragment: VolumeFragment? = null private var volumeFragment: VolumeFragment? = null
private lateinit var shapeDrawable: MaterialShapeDrawable private lateinit var shapeDrawable: MaterialShapeDrawable
private lateinit var wrappedAdapter: RecyclerView.Adapter<*> private lateinit var wrappedAdapter: RecyclerView.Adapter<*>

View file

@ -1,16 +1,21 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<code.name.monkey.retromusic.views.WidthFitSquareCardView <com.google.android.material.card.MaterialCardView
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
android:layout_margin="12dp" android:layout_margin="12dp"
app:cardCornerRadius="8dp" app:cardCornerRadius="8dp"
app:cardElevation="8dp"> app:cardElevation="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/player_image" android:id="@+id/player_image"
@ -20,5 +25,5 @@
tools:ignore="ContentDescription,UnusedAttribute" tools:ignore="ContentDescription,UnusedAttribute"
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" /> tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
</code.name.monkey.retromusic.views.WidthFitSquareCardView> </com.google.android.material.card.MaterialCardView>
</FrameLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -10,67 +10,69 @@
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/colorBackground" android:id="@+id/colorBackground"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
android:background="?attr/colorSurface" android:background="?attr/colorSurface"
android:scaleType="centerCrop" android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@color/black_color" /> app:srcCompat="@color/black_color" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/shadow_up_full_theme" /> android:background="@drawable/shadow_up_full_theme"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout <FrameLayout
android:id="@+id/statusBarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include layout="@layout/status_bar" /> <include layout="@layout/status_bar" />
</FrameLayout> </FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout <androidx.fragment.app.FragmentContainerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<fragment
android:id="@+id/playerAlbumCoverFragment" android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment" android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
tools:layout="@layout/fragment_album_cover" /> app:layout_constraintEnd_toEndOf="parent"
</code.name.monkey.retromusic.views.WidthFitSquareLayout> app:layout_constraintHeight_percent="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/statusBarContainer" />
<FrameLayout <androidx.fragment.app.FragmentContainerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<fragment
android:id="@+id/playbackControlsFragment" android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.fragments.player.blur.BlurPlaybackControlsFragment" android:name="code.name.monkey.retromusic.fragments.player.blur.BlurPlaybackControlsFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" /> android:layout_height="0dp"
</FrameLayout> app:layout_constraintBottom_toTopOf="@id/playerToolbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playerAlbumCoverFragment"
tools:layout="@layout/fragment_player_playback_controls" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar" android:id="@+id/playerToolbar"
style="@style/Toolbar" style="@style/Toolbar"
android:layout_height="48dp" android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playbackControlsFragment"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" /> app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout>
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View file

@ -41,7 +41,6 @@
android:id="@+id/progressSlider" android:id="@+id/progressSlider"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="8"
android:splitTrack="false" android:splitTrack="false"
app:haloColor="@color/md_white_semi_transparent" app:haloColor="@color/md_white_semi_transparent"
app:haloRadius="0dp" app:haloRadius="0dp"
@ -73,9 +72,9 @@
<LinearLayout <LinearLayout
android:id="@+id/titleContainer" android:id="@+id/titleContainer"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/text" app:layout_constraintBottom_toTopOf="@+id/textContainer"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -92,32 +91,45 @@
android:freezesText="true" android:freezesText="true"
android:gravity="center" android:gravity="center"
android:marqueeRepeatLimit="marquee_forever" android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp" android:paddingHorizontal="16dp"
android:paddingEnd="16dp"
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:singleLine="true" android:singleLine="true"
android:textAppearance="@style/TextViewHeadline6" android:textAppearance="@style/TextViewHeadline6"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:textStyle="bold" android:textStyle="bold"
tools:text="@tools:sample/lorem/random" /> tools:text="@tools:sample/lorem" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/textContainer"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/songInfo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleContainer">
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/text" android:id="@+id/text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:ellipsize="end" android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:gravity="center" android:gravity="center"
android:maxLines="1" android:marqueeRepeatLimit="marquee_forever"
android:paddingStart="16dp" android:scrollHorizontally="true"
android:paddingEnd="16dp" android:singleLine="true"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp"
android:textAppearance="@style/TextViewBody1" android:textAppearance="@style/TextViewBody1"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
app:layout_constraintBottom_toTopOf="@+id/songInfo" app:layout_constraintBottom_toTopOf="@+id/songInfo"
app:layout_constraintTop_toBottomOf="@+id/titleContainer" app:layout_constraintTop_toBottomOf="@+id/titleContainer"
tools:text="@tools:sample/lorem/random" /> tools:text="@tools:sample/lorem" />
</LinearLayout>
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/songInfo" android:id="@+id/songInfo"
@ -127,12 +139,12 @@
android:ellipsize="end" android:ellipsize="end"
android:gravity="center" android:gravity="center"
android:maxLines="1" android:maxLines="1"
android:paddingStart="16dp" android:paddingHorizontal="16dp"
android:paddingEnd="16dp" android:paddingBottom="8dp"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp" android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@+id/playPauseButton" app:layout_constraintBottom_toTopOf="@+id/playPauseButton"
app:layout_constraintTop_toBottomOf="@+id/text" app:layout_constraintTop_toBottomOf="@+id/textContainer"
tools:text="@tools:sample/lorem/random" /> tools:text="@tools:sample/lorem/random" />
<androidx.appcompat.widget.AppCompatImageButton <androidx.appcompat.widget.AppCompatImageButton

View file

@ -5,31 +5,39 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<FrameLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/playerContainer" android:id="@+id/playerContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.fragment.app.FragmentContainerView <androidx.fragment.app.FragmentContainerView
android:id="@+id/playerAlbumCoverFragment" android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment" android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" /> android:layout_height="0dp"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="56dp" android:layout_height="56dp"
android:background="@drawable/shadow_down_strong" /> android:background="@drawable/shadow_down_strong"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -45,8 +53,8 @@
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" /> app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</LinearLayout> </LinearLayout>
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
</FrameLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/playerQueueSheet" android:id="@+id/playerQueueSheet"
@ -54,6 +62,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="bottom" android:gravity="bottom"
app:behavior_hideable="false" app:behavior_hideable="false"
app:cardBackgroundColor="?attr/colorSurface"
app:cardCornerRadius="0dp" app:cardCornerRadius="0dp"
app:cardElevation="12dp" app:cardElevation="12dp"
app:layout_behavior="code.name.monkey.retromusic.RetroBottomSheetBehavior" app:layout_behavior="code.name.monkey.retromusic.RetroBottomSheetBehavior"
@ -73,7 +82,6 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:orientation="vertical"> android:orientation="vertical">
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -11,61 +11,57 @@
<View <View
android:id="@+id/colorGradientBackground" android:id="@+id/colorGradientBackground"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include layout="@layout/shadow_statusbar_toolbar" /> <include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout <FrameLayout
android:id="@+id/statusBarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include layout="@layout/status_bar" /> <include layout="@layout/status_bar" />
</FrameLayout> </FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/playerAlbumCoverContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<fragment <androidx.fragment.app.FragmentContainerView
android:id="@+id/playerAlbumCoverFragment" android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment" android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
tools:layout="@layout/fragment_album_cover" /> app:layout_constraintEnd_toEndOf="parent"
</code.name.monkey.retromusic.views.WidthFitSquareLayout> app:layout_constraintHeight_percent="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/statusBarContainer" />
<FrameLayout <androidx.fragment.app.FragmentContainerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<fragment
android:id="@+id/playbackControlsFragment" android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.fragments.player.color.ColorPlaybackControlsFragment" android:name="code.name.monkey.retromusic.fragments.player.color.ColorPlaybackControlsFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
tools:layout="@layout/fragment_color_player_playback_controls" /> app:layout_constraintBottom_toTopOf="@id/playerToolbar"
</FrameLayout> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
<FrameLayout app:layout_constraintTop_toBottomOf="@id/playerAlbumCoverFragment"
android:layout_width="match_parent" tools:layout="@layout/fragment_player_playback_controls" />
android:layout_height="wrap_content"
android:layout_weight="0">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar" android:id="@+id/playerToolbar"
style="@style/Toolbar" style="@style/Toolbar"
android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playbackControlsFragment"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" /> app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</FrameLayout>

View file

@ -1,73 +1,69 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:orientation="vertical"> android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<View <View
android:id="@+id/colorGradientBackground" android:id="@+id/colorGradientBackground"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include layout="@layout/shadow_statusbar_toolbar" /> <include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout <FrameLayout
android:id="@+id/statusBarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include layout="@layout/status_bar" /> <include layout="@layout/status_bar" />
</FrameLayout> </FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar" android:id="@+id/playerToolbar"
style="@style/Toolbar" style="@style/Toolbar"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/statusBarContainer"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" /> app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent" <androidx.fragment.app.FragmentContainerView
android:layout_height="wrap_content">
<fragment
android:id="@+id/playerAlbumCoverFragment" android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment" android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playerToolbar"
tools:layout="@layout/fragment_album_flat_cover" /> tools:layout="@layout/fragment_album_flat_cover" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<fragment <androidx.fragment.app.FragmentContainerView
android:id="@+id/playbackControlsFragment" android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.fragments.player.flat.FlatPlaybackControlsFragment" android:name="code.name.monkey.retromusic.fragments.player.flat.FlatPlaybackControlsFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playerAlbumCoverFragment"
tools:layout="@layout/fragment_flat_player_playback_controls" /> tools:layout="@layout/fragment_flat_player_playback_controls" />
</FrameLayout>
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View file

@ -1,67 +1,57 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:clickable="true" android:clickable="true"
android:focusable="true"> android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<include layout="@layout/shadow_statusbar_toolbar" /> <include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout <FrameLayout
android:id="@+id/statusBarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include layout="@layout/status_bar" /> <include layout="@layout/status_bar" />
</FrameLayout> </FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<fragment <androidx.fragment.app.FragmentContainerView
android:id="@+id/playerAlbumCoverFragment" android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment" android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
tools:layout="@layout/fragment_album_cover" /> app:layout_constraintEnd_toEndOf="parent"
</code.name.monkey.retromusic.views.WidthFitSquareLayout> app:layout_constraintHeight_percent="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/statusBarContainer" />
<FrameLayout <androidx.fragment.app.FragmentContainerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<fragment
android:id="@+id/playbackControlsFragment" android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.fragments.player.material.MaterialControlsFragment" android:name="code.name.monkey.retromusic.fragments.player.material.MaterialControlsFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
tools:layout="@layout/fragment_material_playback_controls" /> app:layout_constraintBottom_toTopOf="@id/playerToolbar"
</FrameLayout> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playerAlbumCoverFragment"
tools:layout="@layout/fragment_player_playback_controls" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar" android:id="@+id/playerToolbar"
style="@style/Toolbar" style="@style/Toolbar"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playbackControlsFragment"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" /> app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</FrameLayout>

View file

@ -1,38 +1,38 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:clickable="true" android:clickable="true"
android:focusable="true"> android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<include layout="@layout/shadow_statusbar_toolbar" /> <include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout <FrameLayout
android:id="@+id/statusBarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include layout="@layout/status_bar" /> <include layout="@layout/status_bar" />
</FrameLayout> </FrameLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:id="@+id/titleContainer"
android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0"
android:orientation="vertical" android:orientation="vertical"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp"> android:paddingEnd="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/statusBarContainer">
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/title" android:id="@+id/title"
@ -61,42 +61,35 @@
tools:text="Text" /> tools:text="Text" />
</LinearLayout> </LinearLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout <androidx.fragment.app.FragmentContainerView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<fragment
android:id="@+id/playerAlbumCoverFragment" android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment" android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
tools:layout="@layout/fragment_album_cover" /> app:layout_constraintEnd_toEndOf="parent"
</code.name.monkey.retromusic.views.WidthFitSquareLayout> app:layout_constraintHeight_percent="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titleContainer" />
<FrameLayout <androidx.fragment.app.FragmentContainerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<fragment
android:id="@+id/playbackControlsFragment" android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.fragments.player.plain.PlainPlaybackControlsFragment" android:name="code.name.monkey.retromusic.fragments.player.plain.PlainPlaybackControlsFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
tools:layout="@layout/fragment_plain_controls_fragment" /> app:layout_constraintBottom_toTopOf="@id/playerToolbar"
</FrameLayout> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
<FrameLayout app:layout_constraintTop_toBottomOf="@id/playerAlbumCoverFragment"
android:layout_width="match_parent" tools:layout="@layout/fragment_player_playback_controls" />
android:layout_height="48dp"
android:layout_weight="0">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar" android:id="@+id/playerToolbar"
style="@style/Toolbar" style="@style/Toolbar"
android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playbackControlsFragment"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" /> app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</FrameLayout>

View file

@ -1,76 +1,69 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:clickable="true" android:clickable="true"
android:focusable="true"> android:focusable="true">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface" />
<View <View
android:id="@+id/colorGradientBackground" android:id="@+id/colorGradientBackground"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include layout="@layout/shadow_statusbar_toolbar" /> <include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout <FrameLayout
android:id="@+id/statusBarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include layout="@layout/status_bar" /> <include layout="@layout/status_bar" />
</FrameLayout> </FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout <androidx.fragment.app.FragmentContainerView
android:id="@+id/playerAlbumCoverContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<fragment
android:id="@+id/playerAlbumCoverFragment" android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment" android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
tools:layout="@layout/fragment_album_cover" /> app:layout_constraintEnd_toEndOf="parent"
</code.name.monkey.retromusic.views.WidthFitSquareLayout> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/statusBarContainer"
app:layout_constraintHeight_percent="0.5" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<fragment <androidx.fragment.app.FragmentContainerView
android:id="@+id/playbackControlsFragment" android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.fragments.player.normal.PlayerPlaybackControlsFragment" android:name="code.name.monkey.retromusic.fragments.player.normal.PlayerPlaybackControlsFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/playerToolbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playerAlbumCoverFragment"
tools:layout="@layout/fragment_player_playback_controls" /> tools:layout="@layout/fragment_player_playback_controls" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar" android:id="@+id/playerToolbar"
style="@style/Toolbar" style="@style/Toolbar"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playbackControlsFragment"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" /> app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout>
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View file

@ -108,6 +108,7 @@
android:ellipsize="end" android:ellipsize="end"
android:gravity="center" android:gravity="center"
android:maxLines="2" android:maxLines="2"
android:paddingBottom="8dp"
android:paddingHorizontal="16dp" android:paddingHorizontal="16dp"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
android:textSize="12sp" android:textSize="12sp"

View file

@ -1,69 +1,60 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:orientation="vertical"> android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<include layout="@layout/shadow_statusbar_toolbar" /> <include layout="@layout/shadow_statusbar_toolbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout <FrameLayout
android:id="@+id/statusBarContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<include layout="@layout/status_bar" /> <include layout="@layout/status_bar" />
</FrameLayout> </FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<fragment <androidx.fragment.app.FragmentContainerView
android:id="@+id/playerAlbumCoverFragment" android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment" android:name="code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
tools:layout="@layout/fragment_album_cover" /> app:layout_constraintEnd_toEndOf="parent"
</code.name.monkey.retromusic.views.WidthFitSquareLayout> app:layout_constraintHeight_percent="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/statusBarContainer" />
<FrameLayout <androidx.fragment.app.FragmentContainerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<fragment
android:id="@+id/playbackControlsFragment" android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.fragments.player.simple.SimplePlaybackControlsFragment" android:name="code.name.monkey.retromusic.fragments.player.simple.SimplePlaybackControlsFragment"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="0dp"
tools:layout="@layout/fragment_simple_controls_fragment" /> app:layout_constraintBottom_toTopOf="@id/playerToolbar"
</FrameLayout> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playerAlbumCoverFragment"
tools:layout="@layout/fragment_player_playback_controls" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<com.google.android.material.appbar.MaterialToolbar <com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar" android:id="@+id/playerToolbar"
style="@style/Toolbar" style="@style/Toolbar"
android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/playbackControlsFragment"
app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" /> app:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp" />
</FrameLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</FrameLayout>