[Android] Fix audio player spacings and shadows
Nicolas Pomepuy
git at videolan.org
Thu Dec 23 09:45:07 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Dec 22 11:55:03 2021 +0100| [50caf377955658d86873687c12f92ac2e42d3de6] | committer: Nicolas Pomepuy
Fix audio player spacings and shadows
> https://code.videolan.org/videolan/vlc-android/commit/50caf377955658d86873687c12f92ac2e42d3de6
---
application/vlc-android/res/layout-land/audio_player.xml | 4 +---
.../res/layout-large-land/cover_media_switcher_item.xml | 11 +++++++----
.../src/org/videolan/vlc/gui/audio/AudioPlayerAnimator.kt | 1 +
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/application/vlc-android/res/layout-land/audio_player.xml b/application/vlc-android/res/layout-land/audio_player.xml
index 2b020590c..d80d5669b 100644
--- a/application/vlc-android/res/layout-land/audio_player.xml
+++ b/application/vlc-android/res/layout-land/audio_player.xml
@@ -457,7 +457,7 @@
android:id="@+id/track_info_container"
android:visibility="gone"
tools:visibility="visible"
- android:layout_marginTop="8dp"
+ android:layout_marginTop="32dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toTopOf="@+id/time"
app:layout_constraintEnd_toEndOf="parent"
@@ -469,7 +469,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
- android:layout_marginTop="24dp"
android:layout_marginEnd="24dp"
android:fontFamily="sans-serif-light"
android:maxLines="1"
@@ -506,7 +505,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
- android:layout_marginTop="8dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="16dp"
android:maxLines="1"
diff --git a/application/vlc-android/res/layout-large-land/cover_media_switcher_item.xml b/application/vlc-android/res/layout-large-land/cover_media_switcher_item.xml
index 31da254cb..94988791e 100644
--- a/application/vlc-android/res/layout-large-land/cover_media_switcher_item.xml
+++ b/application/vlc-android/res/layout-large-land/cover_media_switcher_item.xml
@@ -28,17 +28,21 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:clipToPadding="false"
android:background="#00000000"
android:orientation="horizontal">
- <androidx.cardview.widget.CardView
+ <com.google.android.material.card.MaterialCardView
android:id="@+id/cover_card"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
app:cardBackgroundColor="@android:color/transparent"
app:cardCornerRadius="0dp"
- app:cardElevation="16dp"
+ app:cardElevation="12dp"
+ android:layout_marginBottom="24dp"
+ android:layout_marginStart="24dp"
+ android:layout_marginEnd="24dp"
app:layout_constrainedHeight="true"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/song_title"
@@ -54,9 +58,8 @@
android:layout_height="match_parent"
android:background="#00000000"
android:scaleType="centerCrop"
- app:elevation="8dp"
tools:srcCompat="@tools:sample/avatars" />
- </androidx.cardview.widget.CardView>
+ </com.google.android.material.card.MaterialCardView>
<TextView
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerAnimator.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerAnimator.kt
index f79dea1e7..cc15fe139 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerAnimator.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerAnimator.kt
@@ -146,6 +146,7 @@ internal class AudioPlayerAnimator : IAudioPlayerAnimator, LifecycleObserver {
if (audioPlayer.isTablet()) {
hidePlaylistLandscapeConstraint.constrainHeight(R.id.track_info_container, ConstraintSet.WRAP_CONTENT)
hidePlaylistLandscapeConstraint.setDimensionRatio(R.id.cover_media_switcher, null)
+ hidePlaylistLandscapeConstraint.setMargin(R.id.track_info_container, ConstraintSet.TOP, 0)
hidePlaylistLandscapeConstraint.connect(R.id.cover_media_switcher, ConstraintSet.TOP, R.id.header, ConstraintSet.BOTTOM)
hidePlaylistLandscapeConstraint.connect(R.id.cover_media_switcher, ConstraintSet.END, ConstraintSet.PARENT_ID, ConstraintSet.END)
hidePlaylistLandscapeConstraint.connect(R.id.track_info_container, ConstraintSet.START, ConstraintSet.PARENT_ID, ConstraintSet.START)
More information about the Android
mailing list