Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Display tooltips on Android versions below 8.0 #5719

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import android.view.Window
import android.widget.FrameLayout
import android.widget.ImageView
import android.widget.TextView
import androidx.appcompat.widget.TooltipCompat
import androidx.core.content.ContextCompat
import androidx.core.os.postDelayed
import androidx.core.view.WindowInsetsCompat
Expand Down Expand Up @@ -52,7 +53,6 @@ import com.github.libretube.helpers.WindowHelper
import com.github.libretube.obj.BottomSheetItem
import com.github.libretube.ui.base.BaseActivity
import com.github.libretube.ui.extensions.toggleSystemBars
import com.github.libretube.ui.extensions.trySetTooltip
import com.github.libretube.ui.fragments.PlayerFragment
import com.github.libretube.ui.interfaces.PlayerGestureOptions
import com.github.libretube.ui.interfaces.PlayerOptions
Expand Down Expand Up @@ -141,7 +141,7 @@ open class CustomExoPlayerView(
}

binding.lockPlayer.setImageResource(icon)
binding.lockPlayer.trySetTooltip(context.getString(tooltip))
TooltipCompat.setTooltipText(binding.lockPlayer, context.getString(tooltip))

// show/hide all the controls
lockPlayer(isPlayerLocked)
Expand Down
Loading