Only update the popup window when it is shown. This avoids throwing an NPE in PopupWindow.
A PopupWindow is only aware of its content view after being shown.
This commit is contained in:
Romain Guy
2009-05-29 12:05:11 -07:00
parent d9cc7659fa
commit c51ef9702d

View File

@@ -1570,7 +1570,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
if (mInstallGesturesOverlay) {
installGesturesOverlay();
positionGesturesPopup();
} else if (mGesturesPopup != null) {
} else if (mGesturesPopup != null && mGesturesPopup.isShowing()) {
mGesturesPopup.update(w, h);
}
}