[Android] Fix RTL for the audio player
Nicolas Pomepuy
git at videolan.org
Fri Nov 22 13:53:24 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Nov 13 13:41:14 2024 +0100| [10ef1b084b2635f7c04caca041a198e8a239b85c] | committer: Nicolas Pomepuy
Fix RTL for the audio player
Fixes #3103
> https://code.videolan.org/videolan/vlc-android/commit/10ef1b084b2635f7c04caca041a198e8a239b85c
---
.../vlc-android/res/layout-land/audio_player.xml | 25 +++++++++++-----------
.../vlc-android/res/layout/audio_player.xml | 25 +++++++++++-----------
2 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/application/vlc-android/res/layout-land/audio_player.xml b/application/vlc-android/res/layout-land/audio_player.xml
index 09dfa45f88..173d67850c 100644
--- a/application/vlc-android/res/layout-land/audio_player.xml
+++ b/application/vlc-android/res/layout-land/audio_player.xml
@@ -670,7 +670,7 @@
android:textColor="?attr/font_default"
android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@+id/timeline"
- app:layout_constraintStart_toStartOf="@+id/timeline" />
+ app:layout_constraintLeft_toLeftOf="@+id/timeline" />
<org.videolan.vlc.gui.view.AccessibleSeekBar
android:id="@+id/timeline"
@@ -682,6 +682,7 @@
android:minHeight="1dip"
android:paddingStart="0dp"
android:paddingEnd="0dp"
+ android:layoutDirection="ltr"
android:progressDrawable="?attr/audio_seek_bar"
android:splitTrack="false"
android:thumb="@drawable/ic_seekbar_thumb_audio"
@@ -703,7 +704,7 @@
android:textColor="?attr/font_default"
android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@+id/timeline"
- app:layout_constraintEnd_toEndOf="@+id/timeline" />
+ app:layout_constraintRight_toRightOf="@+id/timeline" />
<ImageView
android:id="@+id/shuffle"
@@ -719,9 +720,9 @@
android:onClick="@{fragment::onShuffleClick}"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
- app:layout_constraintEnd_toStartOf="@+id/previous"
+ app:layout_constraintRight_toLeftOf="@+id/previous"
app:layout_constraintHorizontal_chainStyle="packed"
- app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="@+id/play_pause"
app:srcCompat="@drawable/ic_shuffle_audio" />
@@ -738,8 +739,8 @@
android:onClick="@{fragment::onPreviousClick}"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
- app:layout_constraintEnd_toStartOf="@+id/play_pause"
- app:layout_constraintStart_toEndOf="@+id/shuffle"
+ app:layout_constraintRight_toLeftOf="@+id/play_pause"
+ app:layout_constraintLeft_toRightOf="@+id/shuffle"
app:layout_constraintTop_toTopOf="@+id/play_pause"
app:srcCompat="@drawable/ic_previous" />
@@ -755,8 +756,8 @@
android:onLongClick="@{fragment::onStopClick}"
android:padding="4dp"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@+id/next"
- app:layout_constraintStart_toEndOf="@+id/previous" />
+ app:layout_constraintRight_toLeftOf="@+id/next"
+ app:layout_constraintLeft_toRightOf="@+id/previous" />
<ImageView
android:id="@+id/next"
@@ -772,8 +773,8 @@
android:padding="8dp"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
- app:layout_constraintEnd_toStartOf="@+id/repeat"
- app:layout_constraintStart_toEndOf="@+id/play_pause"
+ app:layout_constraintRight_toLeftOf="@+id/repeat"
+ app:layout_constraintLeft_toRightOf="@+id/play_pause"
app:layout_constraintTop_toTopOf="@+id/play_pause"
app:srcCompat="@drawable/ic_next" />
@@ -791,8 +792,8 @@
android:onClick="@{fragment::onRepeatClick}"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toEndOf="@+id/next"
+ app:layout_constraintRight_toRightOf="parent"
+ app:layout_constraintLeft_toRightOf="@+id/next"
app:layout_constraintTop_toTopOf="@+id/play_pause"
app:srcCompat="@drawable/ic_repeat_audio" />
diff --git a/application/vlc-android/res/layout/audio_player.xml b/application/vlc-android/res/layout/audio_player.xml
index ea9f746a34..576de68fef 100644
--- a/application/vlc-android/res/layout/audio_player.xml
+++ b/application/vlc-android/res/layout/audio_player.xml
@@ -561,7 +561,7 @@
android:textColor="?attr/font_default"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/length"
- app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="@+id/length" />
<View
@@ -585,6 +585,7 @@
android:padding="0dp"
android:paddingStart="0dp"
android:paddingEnd="0dp"
+ android:layoutDirection="ltr"
android:progressDrawable="?attr/audio_seek_bar"
android:splitTrack="false"
android:thumb="@drawable/ic_seekbar_thumb_audio"
@@ -607,7 +608,7 @@
android:textColor="?attr/font_default"
android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@+id/timeline"
- app:layout_constraintEnd_toEndOf="parent" />
+ app:layout_constraintRight_toRightOf="parent" />
<ImageView
android:id="@+id/shuffle"
@@ -623,10 +624,10 @@
android:visibility="@{can_shuffle ? View.VISIBLE : View.INVISIBLE}"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
- app:layout_constraintEnd_toStartOf="@+id/previous"
+ app:layout_constraintRight_toLeftOf="@+id/previous"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
- app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="@+id/play_pause"
app:srcCompat="@drawable/ic_shuffle_audio" />
@@ -643,9 +644,9 @@
android:onClick="@{fragment::onPreviousClick}"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
- app:layout_constraintEnd_toStartOf="@+id/play_pause"
+ app:layout_constraintRight_toLeftOf="@+id/play_pause"
app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/shuffle"
+ app:layout_constraintLeft_toRightOf="@+id/shuffle"
app:layout_constraintTop_toTopOf="@+id/play_pause"
app:srcCompat="@drawable/ic_previous" />
@@ -662,9 +663,9 @@
android:onLongClick="@{fragment::onStopClick}"
android:padding="4dp"
app:layout_constraintBottom_toBottomOf="@+id/backgroundView"
- app:layout_constraintEnd_toStartOf="@+id/next"
+ app:layout_constraintRight_toLeftOf="@+id/next"
app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/previous" />
+ app:layout_constraintLeft_toRightOf="@+id/previous" />
<ImageView
android:id="@+id/next"
@@ -680,9 +681,9 @@
android:padding="8dp"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
- app:layout_constraintEnd_toStartOf="@+id/repeat"
+ app:layout_constraintRight_toLeftOf="@+id/repeat"
app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/play_pause"
+ app:layout_constraintLeft_toRightOf="@+id/play_pause"
app:layout_constraintTop_toTopOf="@+id/play_pause"
app:srcCompat="@drawable/ic_next" />
@@ -700,9 +701,9 @@
android:padding="8dp"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="@+id/play_pause"
- app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintRight_toRightOf="parent"
app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/next"
+ app:layout_constraintLeft_toRightOf="@+id/next"
app:layout_constraintTop_toTopOf="@+id/play_pause"
app:srcCompat="@drawable/ic_repeat_audio" />
More information about the Android
mailing list