Search in sources :

Example 11 with ViewGroupOverlay

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);
        }
    }
}
Also used : ViewGroupOverlay(android.view.ViewGroupOverlay) ViewGroup(android.view.ViewGroup) ImageView(android.widget.ImageView) GhostView(android.view.GhostView) View(android.view.View)

Aggregations

View (android.view.View)11 ViewGroupOverlay (android.view.ViewGroupOverlay)11 ViewGroup (android.view.ViewGroup)10 ImageView (android.widget.ImageView)6 Animator (android.animation.Animator)5 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)5 ObjectAnimator (android.animation.ObjectAnimator)5 GhostView (android.view.GhostView)5 Bitmap (android.graphics.Bitmap)1 Pair (android.util.Pair)1 ViewTreeObserver (android.view.ViewTreeObserver)1 DecelerateInterpolator (android.view.animation.DecelerateInterpolator)1 AdapterView (android.widget.AdapterView)1 ListView (android.widget.ListView)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Set (java.util.Set)1 WifiAutoDownloadPictureRunnable (org.qii.weiciyuan.othercomponent.WifiAutoDownloadPictureRunnable)1 HeaderListView (org.qii.weiciyuan.support.lib.HeaderListView)1 VelocityListView (org.qii.weiciyuan.support.lib.VelocityListView)1