Search in sources :

Example 1 with GhostView

use of android.view.GhostView in project platform_frameworks_base by android.

the class ChangeTransform method createGhostView.

private void createGhostView(final ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues) {
    View view = endValues.view;
    Matrix endMatrix = (Matrix) endValues.values.get(PROPNAME_PARENT_MATRIX);
    Matrix localEndMatrix = new Matrix(endMatrix);
    sceneRoot.transformMatrixToLocal(localEndMatrix);
    GhostView ghostView = GhostView.addGhost(view, sceneRoot, localEndMatrix);
    Transition outerTransition = this;
    while (outerTransition.mParent != null) {
        outerTransition = outerTransition.mParent;
    }
    GhostListener listener = new GhostListener(view, startValues.view, ghostView);
    outerTransition.addListener(listener);
    if (startValues.view != endValues.view) {
        startValues.view.setTransitionAlpha(0);
    }
    view.setTransitionAlpha(1);
}
Also used : Matrix(android.graphics.Matrix) GhostView(android.view.GhostView) GhostView(android.view.GhostView) View(android.view.View)

Example 2 with GhostView

use of android.view.GhostView in project android_frameworks_base by AOSPA.

the class ChangeTransform method createGhostView.

private void createGhostView(final ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues) {
    View view = endValues.view;
    Matrix endMatrix = (Matrix) endValues.values.get(PROPNAME_PARENT_MATRIX);
    Matrix localEndMatrix = new Matrix(endMatrix);
    sceneRoot.transformMatrixToLocal(localEndMatrix);
    GhostView ghostView = GhostView.addGhost(view, sceneRoot, localEndMatrix);
    Transition outerTransition = this;
    while (outerTransition.mParent != null) {
        outerTransition = outerTransition.mParent;
    }
    GhostListener listener = new GhostListener(view, startValues.view, ghostView);
    outerTransition.addListener(listener);
    if (startValues.view != endValues.view) {
        startValues.view.setTransitionAlpha(0);
    }
    view.setTransitionAlpha(1);
}
Also used : Matrix(android.graphics.Matrix) GhostView(android.view.GhostView) GhostView(android.view.GhostView) View(android.view.View)

Example 3 with GhostView

use of android.view.GhostView in project android_frameworks_base by crdroidandroid.

the class ChangeTransform method createGhostView.

private void createGhostView(final ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues) {
    View view = endValues.view;
    Matrix endMatrix = (Matrix) endValues.values.get(PROPNAME_PARENT_MATRIX);
    Matrix localEndMatrix = new Matrix(endMatrix);
    sceneRoot.transformMatrixToLocal(localEndMatrix);
    GhostView ghostView = GhostView.addGhost(view, sceneRoot, localEndMatrix);
    Transition outerTransition = this;
    while (outerTransition.mParent != null) {
        outerTransition = outerTransition.mParent;
    }
    GhostListener listener = new GhostListener(view, startValues.view, ghostView);
    outerTransition.addListener(listener);
    if (startValues.view != endValues.view) {
        startValues.view.setTransitionAlpha(0);
    }
    view.setTransitionAlpha(1);
}
Also used : Matrix(android.graphics.Matrix) GhostView(android.view.GhostView) GhostView(android.view.GhostView) View(android.view.View)

Example 4 with GhostView

use of android.view.GhostView in project android_frameworks_base by DirtyUnicorns.

the class ChangeTransform method createGhostView.

private void createGhostView(final ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues) {
    View view = endValues.view;
    Matrix endMatrix = (Matrix) endValues.values.get(PROPNAME_PARENT_MATRIX);
    Matrix localEndMatrix = new Matrix(endMatrix);
    sceneRoot.transformMatrixToLocal(localEndMatrix);
    GhostView ghostView = GhostView.addGhost(view, sceneRoot, localEndMatrix);
    Transition outerTransition = this;
    while (outerTransition.mParent != null) {
        outerTransition = outerTransition.mParent;
    }
    GhostListener listener = new GhostListener(view, startValues.view, ghostView);
    outerTransition.addListener(listener);
    if (startValues.view != endValues.view) {
        startValues.view.setTransitionAlpha(0);
    }
    view.setTransitionAlpha(1);
}
Also used : Matrix(android.graphics.Matrix) GhostView(android.view.GhostView) GhostView(android.view.GhostView) View(android.view.View)

Example 5 with GhostView

use of android.view.GhostView in project android_frameworks_base by ResurrectionRemix.

the class ChangeTransform method createGhostView.

private void createGhostView(final ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues) {
    View view = endValues.view;
    Matrix endMatrix = (Matrix) endValues.values.get(PROPNAME_PARENT_MATRIX);
    Matrix localEndMatrix = new Matrix(endMatrix);
    sceneRoot.transformMatrixToLocal(localEndMatrix);
    GhostView ghostView = GhostView.addGhost(view, sceneRoot, localEndMatrix);
    Transition outerTransition = this;
    while (outerTransition.mParent != null) {
        outerTransition = outerTransition.mParent;
    }
    GhostListener listener = new GhostListener(view, startValues.view, ghostView);
    outerTransition.addListener(listener);
    if (startValues.view != endValues.view) {
        startValues.view.setTransitionAlpha(0);
    }
    view.setTransitionAlpha(1);
}
Also used : Matrix(android.graphics.Matrix) GhostView(android.view.GhostView) GhostView(android.view.GhostView) View(android.view.View)

Aggregations

Matrix (android.graphics.Matrix)5 GhostView (android.view.GhostView)5 View (android.view.View)5