Defer TooltipPopup show till anchor has been laid out.

This commit is contained in:
Clark
2023-07-17 16:40:08 -04:00
committed by GitHub
parent 244902ecfc
commit acee65ba25

View File

@@ -117,6 +117,7 @@ public class TooltipPopup extends PopupWindow {
private void show() { private void show() {
if (anchor.getWidth() == 0 && anchor.getHeight() == 0) { if (anchor.getWidth() == 0 && anchor.getHeight() == 0) {
anchor.post(this::show); anchor.post(this::show);
return;
} }
getContentView().measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED), getContentView().measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),