protected void prepareAndAnimateView(View v, float initTransX, boolean notifyAnimationFinished) { v.setLayerType(2, null); v.buildLayer(); v.setAlpha(0.0f); v.setTranslationX(initTransX); v.animate().alpha(1.0f).translationX(0.0f).setDuration(250).setStartDelay(120); v.animate().setInterpolator(new DecelerateInterpolator(1.0f)); v.animate().setListener(new C02175(v, notifyAnimationFinished)); v.animate().start(); }
@Override public void onAnimationStart(Animator animation) { // Enable all necessary layers Iterator<Map.Entry<View, Integer>> itr = mViewsToLayerTypeMap.entrySet().iterator(); while (itr.hasNext()) { Map.Entry<View, Integer> entry = itr.next(); View v = entry.getKey(); entry.setValue(v.getLayerType()); v.setLayerType(View.LAYER_TYPE_HARDWARE, null); if (v.isAttachedToWindow() && v.getVisibility() == View.VISIBLE) { v.buildLayer(); } } }
public void run() { // Check that mStateAnimation hasn't changed while // we waited for a layout/draw pass if (mStateAnimation != stateAnimation) { return; } dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); if (Utilities.isLmpOrAbove()) { for (int i = 0; i < layerViews.size(); i++) { View v = layerViews.get(i); if (v != null) { boolean attached = true; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { attached = v.isAttachedToWindow(); } if (attached) { v.buildLayer(); } } } } mStateAnimation.start(); } };
private void prepareAndAnimateView(View v, float initAlpha, float destAlpha, int duration, int delay, Interpolator interpolator, boolean pressed) { if (v != null && v.getWindowToken() != null) { DialogFragment.Action action = ((ActionViewHolder) v.getTag(R.id.action_title)).getAction(); if (!pressed) { fadeCheckmarks(v, action, duration, delay, interpolator); } v.setAlpha(initAlpha); v.setLayerType(2, null); v.buildLayer(); v.animate().alpha(destAlpha).setDuration((long) duration).setStartDelay((long) delay); if (interpolator != null) { v.animate().setInterpolator(interpolator); } v.animate().setListener(new C02101(v, pressed, action)); v.animate().start(); } }
public void run() { // Check that mStateAnimation hasn't changed while // we waited for a layout/draw pass if (mStateAnimation != stateAnimation) { return; } dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); revealView.setAlpha(initAlpha); if (Utilities.isLmpOrAbove()) { for (int i = 0; i < layerViews.size(); i++) { View v = layerViews.get(i); if (v != null) { boolean attached = true; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { attached = v.isAttachedToWindow(); } if (attached) { v.buildLayer(); } } } } mStateAnimation.start(); } };
@TargetApi(Build.VERSION_CODES.LOLLIPOP) public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromWorkspace, animated, true); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && v.isAttachedToWindow()) { v.buildLayer(); } } stateAnimation.start(); } };
@TargetApi(Build.VERSION_CODES.LOLLIPOP) public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromWorkspace, animated, true); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && v.isAttachedToWindow()) { v.buildLayer(); } } stateAnimation.start(); } };
@TargetApi(Build.VERSION_CODES.LOLLIPOP) public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && v.isAttachedToWindow()) { v.buildLayer(); } } stateAnimation.start(); } };
public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && Utilities.isViewAttachedToWindow(v)) { v.buildLayer(); } } // Focus the new view toView.requestFocus(); stateAnimation.start(); } };
@TargetApi(Build.VERSION_CODES.LOLLIPOP) public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && v.isAttachedToWindow()) { v.buildLayer(); } } stateAnimation.start(); } };
public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && v.isAttachedToWindow()) { v.buildLayer(); } } // Focus the new view toView.requestFocus(); stateAnimation.start(); } };
public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && Utilities.isViewAttachedToWindow(v)) { v.buildLayer(); } } stateAnimation.start(); } };
public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && v.isAttachedToWindow()) { v.buildLayer(); } } // Focus the new view toView.requestFocus(); stateAnimation.start(); } };
public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && v.isAttachedToWindow()) { v.buildLayer(); } } toView.requestFocus(); stateAnimation.start(); } };
public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && v.isAttachedToWindow()) { v.buildLayer(); } } toView.requestFocus(); stateAnimation.start(); } };
public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && v.isAttachedToWindow()) { v.buildLayer(); } } // Focus the new view toView.requestFocus(); stateAnimation.start(); } };
public void run() { // Check that mCurrentAnimation hasn't changed while // we waited for a layout/draw pass if (mCurrentAnimation != stateAnimation) return; dispatchOnLauncherTransitionStart(fromView, animated, false); dispatchOnLauncherTransitionStart(toView, animated, false); // Enable all necessary layers for (View v : layerViews.keySet()) { if (layerViews.get(v) == BUILD_AND_SET_LAYER) { v.setLayerType(View.LAYER_TYPE_HARDWARE, null); } if (Utilities.ATLEAST_LOLLIPOP && v.isAttachedToWindow()) { v.buildLayer(); } } // Focus the new view toView.requestFocus(); stateAnimation.start(); } };
Trace.endSection(); Trace.beginSection(TAG + " buildLayer"); fragmentView.buildLayer(); Trace.endSection();