fixed topview null

This commit is contained in:
lixiaopeng
2021-11-29 16:57:19 +08:00
parent 096b101363
commit 221c8bdbae

View File

@@ -150,16 +150,18 @@ public class TopViewNoLinkageAnimHelper {
public void removeAllView() {
Logger.d(TAG, "remove all view");
isTopViewOut = true;
int lastCount = topContainerNoLinkage.getChildCount();
for (int i = 0; i < lastCount; i++) {
View child = topContainerNoLinkage.getChildAt(i);
IMogoTopViewStatusListener listener = statusListenerMap.remove(child);
if (listener != null) {
listener.beforeViewRemoveAnim(child);
listener.onViewRemoved(child);
if (topContainerNoLinkage != null) {
int lastCount = topContainerNoLinkage.getChildCount();
for (int i = 0; i < lastCount; i++) {
View child = topContainerNoLinkage.getChildAt(i);
IMogoTopViewStatusListener listener = statusListenerMap.remove(child);
if (listener != null) {
listener.beforeViewRemoveAnim(child);
listener.onViewRemoved(child);
}
}
topContainerNoLinkage.removeAllViews();
}
topContainerNoLinkage.removeAllViews();
MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, Scene.AIMLESS);
}