Skip to content

Commit

Permalink
#3668 setToolTip method fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sagar0-0 committed Feb 10, 2024
1 parent 30c2e17 commit 487346e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package org.kiwix.kiwixmobile.core.extensions

import android.annotation.SuppressLint
import android.os.Build
import android.view.View
import androidx.annotation.ColorInt
import androidx.appcompat.widget.TooltipCompat
Expand Down Expand Up @@ -73,9 +72,5 @@ fun View.snack(
}

fun View.setToolTip(description: String) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
TooltipCompat.setTooltipText(this, description)
} else {
contentDescription = description
}
TooltipCompat.setTooltipText(this, description)
}
Original file line number Diff line number Diff line change
Expand Up @@ -767,11 +767,9 @@ abstract class CoreReaderFragment :
}
toolbar?.let(::setUpDrawerToggle)
setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED)
closeAllTabsButton?.apply {
setImageDrawable(
ContextCompat.getDrawable(requireActivity(), R.drawable.ic_close_black_24dp)
)
}
closeAllTabsButton?.setImageDrawable(
ContextCompat.getDrawable(requireActivity(), R.drawable.ic_close_black_24dp)
)
tabSwitcherRoot?.let {
if (it.visibility == View.VISIBLE) {
setTabSwitcherVisibility(View.GONE)
Expand Down

0 comments on commit 487346e

Please sign in to comment.