Loading quickstep/src/com/android/quickstep/views/RecentsView.java +6 −5 Original line number Diff line number Diff line Loading @@ -4980,12 +4980,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T protected void maybeDrawEmptyMessage(Canvas canvas) { if (mShowEmptyMessage && mEmptyTextLayout != null) { // Offset to center in the visible (non-padded) part of RecentsView mTempRect.set(mInsets.left + getPaddingLeft(), mInsets.top + getPaddingTop(), mInsets.right + getPaddingRight(), mInsets.bottom + getPaddingBottom()); // Offsets icon and text up so that the vertical center of screen (accounting for // insets) is between icon and text. int offset = (mEmptyIcon.getIntrinsicHeight() + mEmptyMessagePadding) / 2; canvas.save(); canvas.translate(getScrollX() + (mTempRect.left - mTempRect.right) / 2, (mTempRect.top - mTempRect.bottom) / 2); canvas.translate(getScrollX() + (mInsets.left - mInsets.right) / 2f, (mInsets.top - mInsets.bottom) / 2f - offset); mEmptyIcon.draw(canvas); canvas.translate(mEmptyMessagePadding, mEmptyIcon.getBounds().bottom + mEmptyMessagePadding); Loading Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +6 −5 Original line number Diff line number Diff line Loading @@ -4980,12 +4980,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T protected void maybeDrawEmptyMessage(Canvas canvas) { if (mShowEmptyMessage && mEmptyTextLayout != null) { // Offset to center in the visible (non-padded) part of RecentsView mTempRect.set(mInsets.left + getPaddingLeft(), mInsets.top + getPaddingTop(), mInsets.right + getPaddingRight(), mInsets.bottom + getPaddingBottom()); // Offsets icon and text up so that the vertical center of screen (accounting for // insets) is between icon and text. int offset = (mEmptyIcon.getIntrinsicHeight() + mEmptyMessagePadding) / 2; canvas.save(); canvas.translate(getScrollX() + (mTempRect.left - mTempRect.right) / 2, (mTempRect.top - mTempRect.bottom) / 2); canvas.translate(getScrollX() + (mInsets.left - mInsets.right) / 2f, (mInsets.top - mInsets.bottom) / 2f - offset); mEmptyIcon.draw(canvas); canvas.translate(mEmptyMessagePadding, mEmptyIcon.getBounds().bottom + mEmptyMessagePadding); Loading