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.PlaybackOptionsSheet
|
||||
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.util.DataSaverMode
|
||||
import com.github.libretube.util.PlayingQueue
|
||||
@ -153,6 +154,10 @@ class AudioPlayerFragment : Fragment(), AudioPlayerOptions {
|
||||
}
|
||||
}
|
||||
|
||||
binding.sleepTimer.setOnClickListener {
|
||||
SleepTimerSheet().show(childFragmentManager)
|
||||
}
|
||||
|
||||
binding.openVideo.setOnClickListener {
|
||||
BackgroundHelper.stopBackgroundPlay(requireContext())
|
||||
killFragment()
|
||||
|
@ -279,16 +279,33 @@
|
||||
android:layout_gravity="center"
|
||||
android:padding="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/playback_options"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
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
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
Loading…
x
Reference in New Issue
Block a user