Commit 62375ff9 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Geoffrey Métais

Migrate time picker and playback speed to BottomSheetDialog

parent 85907b9d
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_backspace_pressed" android:state_focused="true" android:state_pressed="true" />
<item android:drawable="@drawable/ic_backspace_pressed" android:state_focused="true" />
<item android:drawable="@drawable/ic_backspace_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/ic_backspace" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:orientation="horizontal"
android:padding="@dimen/half_default_margin">
android:orientation="horizontal">
<LinearLayout
<TextView
android:id="@+id/textView12"
style="@style/Theme.VLC.BottomSheetTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
android:text="@string/playback_speed"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/playback_speed_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:src="?attr/ic_speed_normal_style" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/half_default_margin"
android:layout_marginRight="@dimen/half_default_margin"
android:layout_weight="1"
android:text="@string/playback_speed"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="bottom"
android:paddingLeft="@dimen/default_margin"
android:text="0.25"
android:textSize="12sp" />
<TextView
android:id="@+id/playback_speed_value"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="1.00x"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="bottom|right"
android:paddingRight="@dimen/default_margin"
android:text="4.00"
android:textSize="12sp" />
</LinearLayout>
<SeekBar
android:id="@+id/playback_speed_seek"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:indeterminate="false"
android:max="200"
android:maxHeight="@dimen/seekbar_height"
android:minHeight="@dimen/seekbar_height"
android:nextFocusUp="@+id/playback_speed_icon"
android:nextFocusDown="@+id/playback_speed_plus"
android:progress="100"
android:progressDrawable="@drawable/po_seekbar"
android:splitTrack="false"
android:thumb="@drawable/seekbar_thumb" />
</LinearLayout>
<LinearLayout
<TextView
android:id="@+id/textView13"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_weight="1"
android:text="0.25"
android:textSize="12sp"
app:layout_constraintBaseline_toBaselineOf="@id/playback_speed_value"
app:layout_constraintEnd_toStartOf="@+id/playback_speed_value"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/playback_speed_value"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_weight="1"
android:text="1.00x"
android:textAlignment="center"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/textView14"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/textView13"
app:layout_constraintTop_toBottomOf="@+id/textView12" />
<TextView
android:id="@+id/textView14"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:gravity="bottom|right"
android:text="4.00"
android:textSize="12sp"
app:layout_constraintBaseline_toBaselineOf="@id/playback_speed_value"
app:layout_constraintEnd_toStartOf="@+id/playback_speed_plus"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/playback_speed_value" />
<SeekBar
android:id="@+id/playback_speed_seek"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:focusable="true"
android:indeterminate="false"
android:max="200"
android:maxHeight="@dimen/seekbar_height"
android:minHeight="@dimen/seekbar_height"
android:nextFocusUp="@+id/playback_speed_icon"
android:nextFocusDown="@+id/playback_speed_plus"
android:progress="100"
android:progressDrawable="@drawable/po_seekbar"
android:splitTrack="false"
android:thumb="@drawable/seekbar_thumb"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/playback_speed_minus"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/playback_speed_value" />
<ImageView
android:id="@+id/playback_speed_plus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/playback_speed_plus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/half_default_margin"
android:clickable="true"
android:focusable="true"
android:nextFocusUp="@+id/playback_speed_seek"
android:nextFocusDown="@+id/playback_speed_minus"
android:src="@drawable/ic_plus_circle" />
<ImageView
android:id="@+id/playback_speed_minus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:nextFocusUp="@+id/playback_speed_plus"
android:nextFocusDown="@+id/playback_speed_icon"
android:src="@drawable/ic_minus_circle" />
</LinearLayout>
</LinearLayout>
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:clickable="true"
android:focusable="true"
android:nextFocusUp="@+id/playback_speed_seek"
android:nextFocusDown="@+id/playback_speed_minus"
android:src="@drawable/ic_plus_circle"
app:layout_constraintBottom_toTopOf="@+id/playback_speed_minus"
app:layout_constraintEnd_toEndOf="parent" />
<ImageView
android:id="@+id/playback_speed_minus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:clickable="true"
android:focusable="true"
android:nextFocusUp="@+id/playback_speed_plus"
android:nextFocusDown="@+id/playback_speed_icon"
android:src="@drawable/ic_minus_circle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginBottom="@dimen/half_default_margin"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:layout_marginTop="@dimen/half_default_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/tim_pic_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_close_normal_w" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/tim_pic_title"
android:layout_width="wrap_content"
style="@style/Theme.VLC.BottomSheetTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/half_default_margin"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="PickTimeText"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tim_pic_timetojump"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="@dimen/half_default_margin"
android:textSize="24sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="3">
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tim_pic_1"
android:id="@+id/tim_pic_timetojump"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="1"
android:textStyle="bold" />
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="56dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/tim_pic_delete"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tim_pic_title" />
<TextView
android:id="@+id/tim_pic_2"
<ImageButton
android:id="@+id/tim_pic_delete"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="2"
android:textStyle="bold" />
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:background="@color/transparent"
app:layout_constraintBottom_toBottomOf="@+id/tim_pic_timetojump"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tim_pic_timetojump"
app:srcCompat="@drawable/ic_backspace_w" />
<TextView
android:id="@+id/tim_pic_3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="3"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tim_pic_timetojump">
</LinearLayout>
<TextView
android:id="@+id/tim_pic_1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="1"
android:textSize="18sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="3">
<TextView
android:id="@+id/tim_pic_2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="2"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_4"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="4"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="3"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_5"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="5"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tim_pic_6"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="6"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout2">
</LinearLayout>
<TextView
android:id="@+id/tim_pic_4"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="4"
android:textSize="18sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="3">
<TextView
android:id="@+id/tim_pic_5"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="5"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_7"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="7"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_6"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="6"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_8"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="8"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tim_pic_9"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="9"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/linearLayout4"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
</LinearLayout>
<TextView
android:id="@+id/tim_pic_7"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="7"
android:textSize="18sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="3">
<TextView
android:id="@+id/tim_pic_8"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="8"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_00"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text=":00"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_9"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="9"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_0"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="0"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/tim_pic_30"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text=":30"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/linearLayout4">
</LinearLayout>
<TextView
android:id="@+id/tim_pic_00"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text=":00"
android:textSize="18sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginBottom="@dimen/half_default_margin"
android:gravity="center_vertical"
android:orientation="horizontal"
android:weightSum="3">
<TextView
android:id="@+id/tim_pic_0"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="0"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_cancel"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="@string/cancel"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_30"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text=":30"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tim_pic_delete"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"