Skip to content

Commit

Permalink
add Animation
Browse files Browse the repository at this point in the history
  • Loading branch information
jhj0517 committed Apr 6, 2024
1 parent 0be5ab7 commit 7e3c717
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class TooltipView(

init {
initViews()
setAnimation()
addDismissListener()
}
fun showToolTip() {
Expand Down Expand Up @@ -73,7 +74,14 @@ class TooltipView(
}
}

private fun setAnimation(){
// You can set your own animation here
tooltipWindow.animationStyle = androidx.appcompat.R.style.Animation_AppCompat_DropDownUp
checkMarkWindow.animationStyle = androidx.appcompat.R.style.Animation_AppCompat_Dialog
}

private fun addDismissListener() {
// Binding to null when dismiss to avoid memory leak
tooltipWindow.setOnDismissListener {
_binding = null
}
Expand Down

0 comments on commit 7e3c717

Please sign in to comment.