use of android.view.ViewGroupOverlay in project android_frameworks_base by ResurrectionRemix.
the class ActivityTransitionCoordinator method moveSharedElementsFromOverlay.
protected void moveSharedElementsFromOverlay() {
int numListeners = mGhostViewListeners.size();
for (int i = 0; i < numListeners; i++) {
GhostViewListeners listener = mGhostViewListeners.get(i);
ViewGroup parent = (ViewGroup) listener.getView().getParent();
parent.getViewTreeObserver().removeOnPreDrawListener(listener);
}
mGhostViewListeners.clear();
if (mWindow == null || !mWindow.getSharedElementsUseOverlay()) {
return;
}
ViewGroup decor = getDecor();
if (decor != null) {
ViewGroupOverlay overlay = decor.getOverlay();
int count = mSharedElements.size();
for (int i = 0; i < count; i++) {
View sharedElement = mSharedElements.get(i);
GhostView.removeGhost(sharedElement);
}
}
}
Aggregations