Skip to content

Commit 8da91a6

Browse files
Fabrice Di MeglioAndroid (Google) Code Review
authored andcommitted
Merge "Fix bug #7205072 Text inside popup window is too close to the edge" into jb-mr1-dev
2 parents f2eb2e3 + 3e27c34 commit 8da91a6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

core/java/android/view/View.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,14 +2773,14 @@ static class TransformationInfo {
27732773
* {@hide}
27742774
*/
27752775
@ViewDebug.ExportedProperty(category = "padding")
2776-
protected int mPaddingLeft;
2776+
protected int mPaddingLeft = UNDEFINED_PADDING;
27772777
/**
27782778
* The right padding in pixels, that is the distance in pixels between the
27792779
* right edge of this view and the right edge of its content.
27802780
* {@hide}
27812781
*/
27822782
@ViewDebug.ExportedProperty(category = "padding")
2783-
protected int mPaddingRight;
2783+
protected int mPaddingRight = UNDEFINED_PADDING;
27842784
/**
27852785
* The top padding in pixels, that is the distance in pixels between the
27862786
* top edge of this view and the top edge of its content.
@@ -3620,9 +3620,10 @@ public void onClick(View v) {
36203620
// (stored at this point in mPadding*)
36213621
mUserPaddingLeftInitial = leftPadding >= 0 ? leftPadding : mPaddingLeft;
36223622
mUserPaddingRightInitial = rightPadding >= 0 ? rightPadding : mPaddingRight;
3623-
internalSetPadding(mUserPaddingLeftInitial,
3623+
internalSetPadding(
3624+
mUserPaddingLeftInitial != UNDEFINED_PADDING ? mUserPaddingLeftInitial : 0,
36243625
topPadding >= 0 ? topPadding : mPaddingTop,
3625-
mUserPaddingRightInitial,
3626+
mUserPaddingRightInitial != UNDEFINED_PADDING ? mUserPaddingRightInitial : 0,
36263627
bottomPadding >= 0 ? bottomPadding : mPaddingBottom);
36273628

36283629
if (viewFlagMasks != 0) {
@@ -11597,8 +11598,8 @@ public void resolvePadding() {
1159711598
mUserPaddingStart != UNDEFINED_PADDING) {
1159811599
mUserPaddingLeft = mUserPaddingStart;
1159911600
}
11600-
if (mUserPaddingRightInitial == UNDEFINED_PADDING
11601-
&& mUserPaddingEnd != UNDEFINED_PADDING) {
11601+
if (mUserPaddingRightInitial == UNDEFINED_PADDING &&
11602+
mUserPaddingEnd != UNDEFINED_PADDING) {
1160211603
mUserPaddingRight = mUserPaddingEnd;
1160311604
}
1160411605

0 commit comments

Comments
 (0)