Skip to content

Commit 5ca80f3

Browse files
author
hyuntae0117
committed
modified: getTargetAbsolutePostion 상속가능하도록
1 parent c718a49 commit 5ca80f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

BalloonWindow/src/main/java/com/ht/balloonwindow/BalloonWindow.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ open class BalloonWindow : PopupWindow {
101101
this.listener = listener
102102
}
103103

104-
private fun getAbsolutePosition(view: View): Pair<Int, Int> {
104+
open fun getTargetAbsolutePosition(view: View): Pair<Int, Int> {
105105
val locations = IntArray(2)
106106
view.getLocationOnScreen(locations)
107107
val xPos = locations[0]
@@ -117,7 +117,7 @@ open class BalloonWindow : PopupWindow {
117117
measuredContentsWidth = contentView.measuredWidth
118118
measuredContentsHeight = contentView.measuredHeight
119119

120-
var (xPos, yPos) = getAbsolutePosition(targetView)
120+
var (xPos, yPos) = getTargetAbsolutePosition(targetView)
121121
val pivotX: Float
122122
val pivotY: Float
123123
val margin = margin.toPx()

0 commit comments

Comments
 (0)