Fix chat color selection context menu positioning.
This commit is contained in:
parent
03c19f54c2
commit
6866b7a277
1 changed files with 4 additions and 2 deletions
|
@ -56,8 +56,10 @@ class ChatSelectionContextMenu(val context: Context) : PopupWindow(context) {
|
||||||
anchor.getDrawingRect(rect)
|
anchor.getDrawingRect(rect)
|
||||||
root.offsetDescendantRectToMyCoords(anchor, rect)
|
root.offsetDescendantRectToMyCoords(anchor, rect)
|
||||||
|
|
||||||
if (rect.bottom + contentView.height > root.bottom) {
|
contentView.measure(0, 0)
|
||||||
showAsDropDown(anchor, 0, -(contentView.height + anchor.height))
|
|
||||||
|
if (rect.bottom + contentView.measuredHeight > root.bottom) {
|
||||||
|
showAsDropDown(anchor, 0, -(contentView.measuredHeight + anchor.height))
|
||||||
} else {
|
} else {
|
||||||
showAsDropDown(anchor, 0, 0)
|
showAsDropDown(anchor, 0, 0)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue