[Android] Improve the chapter navigation layout
Nicolas Pomepuy
git at videolan.org
Thu Sep 5 08:48:58 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Aug 8 10:32:02 2024 +0200| [74eddbbfd6ded398b009a93ffc7b22876cd88f68] | committer: Nicolas Pomepuy
Improve the chapter navigation layout
> https://code.videolan.org/videolan/vlc-android/commit/74eddbbfd6ded398b009a93ffc7b22876cd88f68
---
.../vlc-android/res/layout-land/audio_player.xml | 12 ++++--------
.../res/layout-land/cover_media_switcher_item.xml | 21 ---------------------
.../res/layout/cover_media_switcher_item.xml | 14 ++++++--------
3 files changed, 10 insertions(+), 37 deletions(-)
diff --git a/application/vlc-android/res/layout-land/audio_player.xml b/application/vlc-android/res/layout-land/audio_player.xml
index d2c7b142dd..09dfa45f88 100644
--- a/application/vlc-android/res/layout-land/audio_player.xml
+++ b/application/vlc-android/res/layout-land/audio_player.xml
@@ -458,15 +458,12 @@
android:id="@+id/previous_chapter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="24dp"
- android:layout_marginEnd="16dp"
+ android:layout_marginStart="16dp"
android:background="?attr/actionBarItemBackground"
android:clickable="true"
android:focusable="true"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="@+id/song_title"
- app:layout_constraintEnd_toStartOf="@+id/song_title"
- app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/song_title"
@@ -476,6 +473,8 @@
android:id="@+id/song_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
android:ellipsize="marquee"
android:fontFamily="sans-serif-light"
android:importantForAccessibility="no"
@@ -497,16 +496,13 @@
android:id="@+id/next_chapter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginEnd="24dp"
+ android:layout_marginEnd="16dp"
android:background="?attr/actionBarItemBackground"
android:clickable="true"
android:focusable="true"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="@+id/song_title"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/song_title"
app:layout_constraintTop_toTopOf="@+id/song_title"
app:srcCompat="@drawable/ic_chevron_right" />
diff --git a/application/vlc-android/res/layout-land/cover_media_switcher_item.xml b/application/vlc-android/res/layout-land/cover_media_switcher_item.xml
index 3107ed4ec5..ee7729814d 100644
--- a/application/vlc-android/res/layout-land/cover_media_switcher_item.xml
+++ b/application/vlc-android/res/layout-land/cover_media_switcher_item.xml
@@ -58,27 +58,6 @@
tools:srcCompat="@tools:sample/avatars" />
</androidx.cardview.widget.CardView>
- <ImageView
- android:id="@+id/previous_chapter"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginEnd="16dp"
- android:background="?attr/actionBarItemBackground"
- app:layout_constraintBottom_toBottomOf="@+id/song_title"
- app:layout_constraintEnd_toStartOf="@+id/song_title"
- app:layout_constraintTop_toTopOf="@+id/song_title"
- app:srcCompat="@drawable/ic_chevron_left" />
-
- <ImageView
- android:id="@+id/next_chapter"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:background="?attr/actionBarItemBackground"
- app:layout_constraintBottom_toBottomOf="@+id/song_title"
- app:layout_constraintStart_toEndOf="@+id/song_title"
- app:layout_constraintTop_toTopOf="@+id/song_title"
- app:srcCompat="@drawable/ic_chevron_right" />
<TextView
android:id="@+id/song_title"
diff --git a/application/vlc-android/res/layout/cover_media_switcher_item.xml b/application/vlc-android/res/layout/cover_media_switcher_item.xml
index cb7b784420..fc3da9d429 100644
--- a/application/vlc-android/res/layout/cover_media_switcher_item.xml
+++ b/application/vlc-android/res/layout/cover_media_switcher_item.xml
@@ -64,12 +64,10 @@
android:id="@+id/previous_chapter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="24dp"
- android:layout_marginEnd="16dp"
+ android:layout_marginStart="16dp"
+ android:padding="8dp"
android:background="?attr/actionBarItemBackground"
app:layout_constraintBottom_toBottomOf="@+id/song_title"
- app:layout_constraintEnd_toStartOf="@+id/song_title"
- app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/song_title"
@@ -79,13 +77,11 @@
android:id="@+id/next_chapter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginEnd="24dp"
+ android:layout_marginEnd="16dp"
+ android:padding="8dp"
android:background="?attr/actionBarItemBackground"
app:layout_constraintBottom_toBottomOf="@+id/song_title"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/song_title"
app:layout_constraintTop_toTopOf="@+id/song_title"
app:srcCompat="@drawable/ic_chevron_right" />
@@ -93,7 +89,9 @@
android:id="@+id/song_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginStart="16dp"
android:layout_marginTop="24dp"
+ android:layout_marginEnd="16dp"
android:fontFamily="sans-serif-light"
android:importantForAccessibility="no"
android:maxLines="1"
More information about the Android
mailing list