mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
Merge pull request #5425 from RafaelsRamos/feat/5418
feat: Support setting sleep timer on Audio player
This commit is contained in:
commit
c4da395b58
@ -45,6 +45,7 @@ import com.github.libretube.ui.models.PlayerViewModel
|
|||||||
import com.github.libretube.ui.sheets.ChaptersBottomSheet
|
import com.github.libretube.ui.sheets.ChaptersBottomSheet
|
||||||
import com.github.libretube.ui.sheets.PlaybackOptionsSheet
|
import com.github.libretube.ui.sheets.PlaybackOptionsSheet
|
||||||
import com.github.libretube.ui.sheets.PlayingQueueSheet
|
import com.github.libretube.ui.sheets.PlayingQueueSheet
|
||||||
|
import com.github.libretube.ui.sheets.SleepTimerSheet
|
||||||
import com.github.libretube.ui.sheets.VideoOptionsBottomSheet
|
import com.github.libretube.ui.sheets.VideoOptionsBottomSheet
|
||||||
import com.github.libretube.util.DataSaverMode
|
import com.github.libretube.util.DataSaverMode
|
||||||
import com.github.libretube.util.PlayingQueue
|
import com.github.libretube.util.PlayingQueue
|
||||||
@ -153,6 +154,10 @@ class AudioPlayerFragment : Fragment(), AudioPlayerOptions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.sleepTimer.setOnClickListener {
|
||||||
|
SleepTimerSheet().show(childFragmentManager)
|
||||||
|
}
|
||||||
|
|
||||||
binding.openVideo.setOnClickListener {
|
binding.openVideo.setOnClickListener {
|
||||||
BackgroundHelper.stopBackgroundPlay(requireContext())
|
BackgroundHelper.stopBackgroundPlay(requireContext())
|
||||||
killFragment()
|
killFragment()
|
||||||
|
@ -279,15 +279,32 @@
|
|||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:padding="15dp">
|
android:padding="15dp">
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:id="@+id/playback_options"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="start|center_vertical"
|
android:layout_gravity="start|center_vertical"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:orientation="horizontal">
|
||||||
android:scaleX="0.9"
|
|
||||||
android:scaleY="0.9"
|
<ImageView
|
||||||
android:src="@drawable/ic_speed" />
|
android:id="@+id/playback_options"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
|
android:scaleX="0.9"
|
||||||
|
android:scaleY="0.9"
|
||||||
|
android:src="@drawable/ic_speed" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/sleep_timer"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
|
android:scaleX="0.9"
|
||||||
|
android:scaleY="0.9"
|
||||||
|
android:src="@drawable/ic_sleep" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user