Skip to content

Commit 14b2b74

Browse files
committed
Fixing View.getBoundsOnScreen()
1. The function was not setting the initial rect properly. bug:6462629 Change-Id: I7a832a979576fc5745794c68fb8414257efb21dd
1 parent 5602d02 commit 14b2b74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/java/android/view/View.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4676,13 +4676,13 @@ private void getBoundsOnScreen(Rect outRect) {
46764676
}
46774677

46784678
RectF position = mAttachInfo.mTmpTransformRect;
4679-
position.setEmpty();
4679+
position.set(0, 0, mRight - mLeft, mBottom - mTop);
46804680

46814681
if (!hasIdentityMatrix()) {
46824682
getMatrix().mapRect(position);
46834683
}
46844684

4685-
position.offset(mLeft, mRight);
4685+
position.offset(mLeft, mTop);
46864686

46874687
ViewParent parent = mParent;
46884688
while (parent instanceof View) {

0 commit comments

Comments
 (0)