public void print(ValueAnimator animation) { float flatFraction = animation.getCurrentPlayTime() / (float) animation.getDuration(); Log.d( "FirstFrameAnimatorHelper", sGlobalFrameCounter + "(" + (sGlobalFrameCounter - mStartFrame) + ") " + mTarget + " dirty? " + mTarget.isDirty() + " " + flatFraction + " " + this + " " + animation); }
@Override public View newView(Context context, Cursor cursor, ViewGroup viewGroup) { View view; if (mCacheViews && getCachedView(cursor) != null) { view = getCachedView(cursor); if (!view.isDirty()) { return view; } } if (mOnViewCreateListener != null) { view = mOnViewCreateListener.onViewCreated(context, viewGroup, cursor, cursor.getPosition()); if (view == null) { view = mInflater.inflate(mLayout, viewGroup, false); } } else view = mInflater.inflate(mLayout, viewGroup, false); if (mCacheViews) { mViewCache.put("view_" + cursor.getPosition(), view); } return view; }
@TargetApi(Build.VERSION_CODES.HONEYCOMB) @Override protected void dispatchDraw(Canvas canvas) { View childView = getChildAt(0); if (childView != null) { // If on honeycomb or newer, cache the view. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { if (childView.isDirty()) { childView.draw(this.wrappedViewDrawingCanvas); if (this.isReflectionEnabled) { this.createReflectedImages(); } } } else { childView.draw(this.wrappedViewDrawingCanvas); } } canvas.drawBitmap( this.wrappedViewBitmap, (this.getWidth() - childView.getWidth()) / 2, 0, paint); }