mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-21 10:17:56 +00:00
Fix chat color selection context menu positioning.
This commit is contained in:
@@ -56,8 +56,10 @@ class ChatSelectionContextMenu(val context: Context) : PopupWindow(context) {
|
||||
anchor.getDrawingRect(rect)
|
||||
root.offsetDescendantRectToMyCoords(anchor, rect)
|
||||
|
||||
if (rect.bottom + contentView.height > root.bottom) {
|
||||
showAsDropDown(anchor, 0, -(contentView.height + anchor.height))
|
||||
contentView.measure(0, 0)
|
||||
|
||||
if (rect.bottom + contentView.measuredHeight > root.bottom) {
|
||||
showAsDropDown(anchor, 0, -(contentView.measuredHeight + anchor.height))
|
||||
} else {
|
||||
showAsDropDown(anchor, 0, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user