diff --git a/app/src/main/java/com/github/libretube/ui/sheets/PlayingQueueSheet.kt b/app/src/main/java/com/github/libretube/ui/sheets/PlayingQueueSheet.kt index 8f5cdc7f8..9b4724c00 100644 --- a/app/src/main/java/com/github/libretube/ui/sheets/PlayingQueueSheet.kt +++ b/app/src/main/java/com/github/libretube/ui/sheets/PlayingQueueSheet.kt @@ -1,7 +1,6 @@ package com.github.libretube.ui.sheets import android.annotation.SuppressLint -import android.os.Build import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -50,18 +49,6 @@ class PlayingQueueSheet : ExpandedBottomSheet() { val currentPlayingIndex = PlayingQueue.currentIndex() if (currentPlayingIndex != -1) binding.optionsRecycler.scrollToPosition(currentPlayingIndex) - // tooltips are only supported since API 26 - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - binding.repeat.tooltipText = getString(R.string.repeat) - binding.shuffle.tooltipText = getString(R.string.shuffle) - binding.reverse.tooltipText = getString(R.string.reverse) - binding.addToPlaylist.tooltipText = getString(R.string.addToPlaylist) - binding.sort.tooltipText = getString(R.string.sort) - binding.watchPositionsOptions.tooltipText = getString(R.string.watch_position) - binding.clearQueue.tooltipText = getString(R.string.clear_queue) - binding.dismiss?.tooltipText = getString(R.string.dismiss) - } - binding.shuffle.setOnClickListener { val streams = PlayingQueue.getStreams().toMutableList() val currentIndex = PlayingQueue.currentIndex() diff --git a/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt b/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt index ed33c0a59..4080717a4 100644 --- a/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt +++ b/app/src/main/java/com/github/libretube/ui/views/CustomExoPlayerView.kt @@ -5,6 +5,7 @@ import android.app.Activity import android.content.Context import android.content.res.Configuration import android.graphics.Color +import android.os.Build import android.os.Handler import android.os.Looper import android.text.format.DateUtils @@ -127,13 +128,11 @@ open class CustomExoPlayerView( // locking the player binding.lockPlayer.setOnClickListener { // change the locked/unlocked icon - binding.lockPlayer.setImageResource( - if (!isPlayerLocked) { - R.drawable.ic_locked - } else { - R.drawable.ic_unlocked - } - ) + val icon = if (!isPlayerLocked) R.drawable.ic_locked else R.drawable.ic_unlocked; + val tooltip = if (!isPlayerLocked) R.string.tooltip_unlocked else R.string.tooltip_locked; + binding.lockPlayer.setImageResource(icon) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) + binding.lockPlayer.tooltipText = context.getString(tooltip) // show/hide all the controls lockPlayer(isPlayerLocked) diff --git a/app/src/main/res/layout-v26/queue_bottom_sheet.xml b/app/src/main/res/layout-v26/queue_bottom_sheet.xml new file mode 100644 index 000000000..c739db968 --- /dev/null +++ b/app/src/main/res/layout-v26/queue_bottom_sheet.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/exo_styled_player_control_view.xml b/app/src/main/res/layout/exo_styled_player_control_view.xml index 59af57a25..8fd0f3b3c 100644 --- a/app/src/main/res/layout/exo_styled_player_control_view.xml +++ b/app/src/main/res/layout/exo_styled_player_control_view.xml @@ -32,6 +32,7 @@ @@ -311,6 +316,7 @@ diff --git a/app/src/main/res/layout/fragment_player.xml b/app/src/main/res/layout/fragment_player.xml index c35ce684d..ce02638df 100644 --- a/app/src/main/res/layout/fragment_player.xml +++ b/app/src/main/res/layout/fragment_player.xml @@ -367,6 +367,7 @@ - Repeat - Reverse - Sort - Watch position - Clear queue - Dismiss + Repeat + Reverse + Sort + Watch position + Clear queue + Dismiss + + + Lock player + Unlock player + Toggle Sponsorblock + Options + Minimze + Fullscreen + Close + Play \ No newline at end of file