Skip to content

Commit

Permalink
Merge pull request #5719 from Isira-Seneviratne/TooltipCompat
Browse files Browse the repository at this point in the history
feature: Display tooltips on Android versions below 8.0
  • Loading branch information
Isira-Seneviratne authored Mar 9, 2024
2 parents ef0d885 + 826cb23 commit 85d9cb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.

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

0 comments on commit 85d9cb3

Please sign in to comment.