Add shuffle button in landscape mode.

This commit is contained in:
Antoine POPINEAU 2020-05-31 00:38:34 +02:00
parent 64c8887dcb
commit 2d3bcde242
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
2 changed files with 79 additions and 72 deletions

View File

@ -97,97 +97,105 @@
android:id="@+id/now_playing_details" android:id="@+id/now_playing_details"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:orientation="vertical"
android:paddingTop="16dp">
<LinearLayout <TextView
android:id="@+id/now_playing_details_controls" android:id="@+id/now_playing_details_title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="32dp" android:textColor="@color/itemTitle"
android:layout_marginEnd="32dp" android:textSize="18sp"
android:orientation="vertical" tools:text="Supermassive Black Hole" />
android:paddingTop="32dp">
<TextView
android:id="@+id/now_playing_details_artist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="Muse" />
<SeekBar
android:id="@+id/now_playing_details_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:max="100"
android:progressBackgroundTint="#cacaca"
android:progressTint="@color/controlForeground"
android:thumbTint="@color/controlForeground" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView <TextView
android:id="@+id/now_playing_details_title" android:id="@+id/now_playing_details_progress_current"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/itemTitle" android:layout_weight="1" />
android:textSize="18sp"
tools:text="Supermassive Black Hole" />
<TextView <TextView
android:id="@+id/now_playing_details_artist" android:id="@+id/now_playing_details_progress_duration"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:text="Muse" /> android:layout_weight="1"
android:textAlignment="textEnd" />
<SeekBar </LinearLayout>
android:id="@+id/now_playing_details_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:max="100"
android:progressBackgroundTint="#cacaca"
android:progressTint="@color/controlForeground"
android:thumbTint="@color/controlForeground" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="64dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="8dp"
android:orientation="horizontal"> android:gravity="center"
android:orientation="horizontal">
<TextView <ImageButton
android:id="@+id/now_playing_details_progress_current" android:id="@+id/now_playing_details_previous"
android:layout_width="match_parent" style="@style/IconButton"
android:layout_height="wrap_content" android:layout_width="48dp"
android:layout_weight="1" /> android:layout_height="48dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/control_previous"
android:src="@drawable/previous" />
<TextView <com.google.android.material.button.MaterialButton
android:id="@+id/now_playing_details_progress_duration" android:id="@+id/now_playing_details_toggle"
android:layout_width="match_parent" style="@style/AppTheme.OutlinedButton"
android:layout_height="wrap_content" android:layout_width="64dp"
android:layout_weight="1"
android:textAlignment="textEnd" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp" android:layout_height="64dp"
android:layout_marginBottom="16dp" app:cornerRadius="64dp"
android:gravity="center" app:icon="@drawable/play"
android:orientation="horizontal"> app:iconSize="32dp" />
<ImageButton <ImageButton
android:id="@+id/now_playing_details_previous" android:id="@+id/now_playing_details_next"
style="@style/IconButton" style="@style/IconButton"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="48dp" android:layout_height="48dp"
android:layout_marginEnd="16dp" android:layout_marginStart="16dp"
android:contentDescription="@string/control_previous" android:contentDescription="@string/control_next"
android:src="@drawable/previous" /> android:src="@drawable/next" />
<com.google.android.material.button.MaterialButton </LinearLayout>
android:id="@+id/now_playing_details_toggle"
style="@style/AppTheme.OutlinedButton"
android:layout_width="64dp"
android:layout_height="64dp"
app:cornerRadius="64dp"
app:icon="@drawable/play"
app:iconSize="32dp" />
<ImageButton <LinearLayout
android:id="@+id/now_playing_details_next" android:layout_width="match_parent"
style="@style/IconButton" android:layout_height="wrap_content"
android:layout_width="48dp" android:layout_marginBottom="16dp"
android:layout_height="48dp" android:gravity="center"
android:layout_marginStart="16dp" android:orientation="horizontal">
android:contentDescription="@string/control_next"
android:src="@drawable/next" />
</LinearLayout> <ImageButton
android:id="@+id/now_playing_details_repeat"
style="@style/IconButton"
android:layout_width="28dp"
android:layout_height="28dp"
android:contentDescription="@string/control_next"
android:src="@drawable/repeat" />
</LinearLayout> </LinearLayout>

View File

@ -176,7 +176,6 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView