Loading api/17.txt +0 −1 Original line number Diff line number Diff line Loading @@ -29625,7 +29625,6 @@ package android.widget { method protected void onTextChanged(java.lang.CharSequence, int, int, int); method public boolean onTextContextMenuItem(int); method public void removeTextChangedListener(android.text.TextWatcher); method protected void resetResolvedDrawables(); method public void setAllCaps(boolean); method public final void setAutoLinkMask(int); method public void setCompoundDrawablePadding(int); api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -29657,7 +29657,6 @@ package android.widget { method protected void onTextChanged(java.lang.CharSequence, int, int, int); method public boolean onTextContextMenuItem(int); method public void removeTextChangedListener(android.text.TextWatcher); method protected void resetResolvedDrawables(); method public void setAllCaps(boolean); method public final void setAutoLinkMask(int); method public void setCompoundDrawablePadding(int); core/java/android/view/View.java +23 −19 Original line number Diff line number Diff line Loading @@ -3666,15 +3666,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Padding from the background drawable is stored at this point in mUserPaddingLeftInitial // and mUserPaddingRightInitial) so drawable padding will be used as ultimate default if // defined. if (startPaddingDefined) { mUserPaddingLeftInitial = startPadding; } else if (leftPaddingDefined) { if (leftPaddingDefined) { mUserPaddingLeftInitial = leftPadding; } if (endPaddingDefined) { mUserPaddingRightInitial = endPadding; } else if (rightPaddingDefined) { if (rightPaddingDefined) { mUserPaddingRightInitial = rightPadding; } } Loading Loading @@ -11559,8 +11554,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * Resolve all RTL related properties. * * @hide */ void resolveRtlPropertiesIfNeeded() { public void resolveRtlPropertiesIfNeeded() { if (!needRtlPropertiesResolution()) return; // Order is important here: LayoutDirection MUST be resolved first Loading @@ -11584,8 +11581,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, onRtlPropertiesChanged(getLayoutDirection()); } // Reset resolution of all RTL related properties. void resetRtlProperties() { /** * Reset resolution of all RTL related properties. * * @hide */ public void resetRtlProperties() { resetResolvedLayoutDirection(); resetResolvedTextDirection(); resetResolvedTextAlignment(); Loading Loading @@ -14215,7 +14216,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * @hide */ public void resolveDrawables() { protected void resolveDrawables() { if (mBackground != null) { mBackground.setLayoutDirection(getLayoutDirection()); } Loading @@ -14238,7 +14239,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, public void onResolveDrawables(int layoutDirection) { } private void resetResolvedDrawables() { /** * @hide */ protected void resetResolvedDrawables() { mPrivateFlags2 &= ~PFLAG2_DRAWABLE_RESOLVED; } Loading Loading @@ -14828,14 +14832,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (isRtlCompatibilityMode()) { mPaddingLeft = mUserPaddingLeftInitial; mPaddingRight = mUserPaddingRightInitial; } else { return; } if (isLayoutRtl()) { mPaddingLeft = mUserPaddingRightInitial; mPaddingRight = mUserPaddingLeftInitial; mPaddingLeft = (mUserPaddingEnd >= 0) ? mUserPaddingEnd : mUserPaddingLeftInitial; mPaddingRight = (mUserPaddingStart >= 0) ? mUserPaddingStart : mUserPaddingRightInitial; } else { mPaddingLeft = mUserPaddingLeftInitial; mPaddingRight = mUserPaddingRightInitial; } mPaddingLeft = (mUserPaddingStart >= 0) ? mUserPaddingStart : mUserPaddingLeftInitial; mPaddingRight = (mUserPaddingEnd >= 0) ? mUserPaddingEnd : mUserPaddingRightInitial; } } core/java/android/view/ViewGroup.java +92 −0 Original line number Diff line number Diff line Loading @@ -5350,6 +5350,21 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } } /** * @hide */ @Override public void resolveRtlPropertiesIfNeeded() { super.resolveRtlPropertiesIfNeeded(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resolveRtlPropertiesIfNeeded(); } } } /** * @hide */ Loading Loading @@ -5404,6 +5419,51 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return result; } /** * @hide */ @Override public void resolvePadding() { super.resolvePadding(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resolvePadding(); } } } /** * @hide */ @Override protected void resolveDrawables() { super.resolveDrawables(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resolveDrawables(); } } } /** * @hide */ @Override public void resetRtlProperties() { super.resetRtlProperties(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resetRtlProperties(); } } } /** * @hide */ Loading Loading @@ -5452,6 +5512,38 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } } /** * @hide */ @Override public void resetResolvedPadding() { super.resetResolvedPadding(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resetResolvedPadding(); } } } /** * @hide */ @Override protected void resetResolvedDrawables() { super.resetResolvedDrawables(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resetResolvedDrawables(); } } } /** * Return true if the pressed state should be delayed for children or descendants of this * ViewGroup. Generally, this should be done for containers that can scroll, such as a List. Loading core/java/android/widget/CheckedTextView.java +2 −13 Original line number Diff line number Diff line Loading @@ -188,10 +188,11 @@ public class CheckedTextView extends TextView implements Checkable { resetPaddingToInitialValues(); int newPadding = (mCheckMarkDrawable != null) ? mCheckMarkWidth + mBasePadding : mBasePadding; mNeedRequestlayout |= (mPaddingRight != newPadding); if (isLayoutRtl()) { mNeedRequestlayout |= (mPaddingLeft != newPadding); mPaddingLeft = newPadding; } else { mNeedRequestlayout |= (mPaddingRight != newPadding); mPaddingRight = newPadding; } if (mNeedRequestlayout) { Loading @@ -200,18 +201,6 @@ public class CheckedTextView extends TextView implements Checkable { } } @Override public void setPadding(int left, int top, int right, int bottom) { super.setPadding(left, top, right, bottom); setBasePadding(isLayoutRtl()); } @Override public void setPaddingRelative(int start, int top, int end, int bottom) { super.setPaddingRelative(start, top, end, bottom); setBasePadding(isLayoutRtl()); } private void setBasePadding(boolean isLayoutRtl) { if (isLayoutRtl) { mBasePadding = mPaddingLeft; Loading Loading
api/17.txt +0 −1 Original line number Diff line number Diff line Loading @@ -29625,7 +29625,6 @@ package android.widget { method protected void onTextChanged(java.lang.CharSequence, int, int, int); method public boolean onTextContextMenuItem(int); method public void removeTextChangedListener(android.text.TextWatcher); method protected void resetResolvedDrawables(); method public void setAllCaps(boolean); method public final void setAutoLinkMask(int); method public void setCompoundDrawablePadding(int);
api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -29657,7 +29657,6 @@ package android.widget { method protected void onTextChanged(java.lang.CharSequence, int, int, int); method public boolean onTextContextMenuItem(int); method public void removeTextChangedListener(android.text.TextWatcher); method protected void resetResolvedDrawables(); method public void setAllCaps(boolean); method public final void setAutoLinkMask(int); method public void setCompoundDrawablePadding(int);
core/java/android/view/View.java +23 −19 Original line number Diff line number Diff line Loading @@ -3666,15 +3666,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Padding from the background drawable is stored at this point in mUserPaddingLeftInitial // and mUserPaddingRightInitial) so drawable padding will be used as ultimate default if // defined. if (startPaddingDefined) { mUserPaddingLeftInitial = startPadding; } else if (leftPaddingDefined) { if (leftPaddingDefined) { mUserPaddingLeftInitial = leftPadding; } if (endPaddingDefined) { mUserPaddingRightInitial = endPadding; } else if (rightPaddingDefined) { if (rightPaddingDefined) { mUserPaddingRightInitial = rightPadding; } } Loading Loading @@ -11559,8 +11554,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * Resolve all RTL related properties. * * @hide */ void resolveRtlPropertiesIfNeeded() { public void resolveRtlPropertiesIfNeeded() { if (!needRtlPropertiesResolution()) return; // Order is important here: LayoutDirection MUST be resolved first Loading @@ -11584,8 +11581,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, onRtlPropertiesChanged(getLayoutDirection()); } // Reset resolution of all RTL related properties. void resetRtlProperties() { /** * Reset resolution of all RTL related properties. * * @hide */ public void resetRtlProperties() { resetResolvedLayoutDirection(); resetResolvedTextDirection(); resetResolvedTextAlignment(); Loading Loading @@ -14215,7 +14216,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * @hide */ public void resolveDrawables() { protected void resolveDrawables() { if (mBackground != null) { mBackground.setLayoutDirection(getLayoutDirection()); } Loading @@ -14238,7 +14239,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, public void onResolveDrawables(int layoutDirection) { } private void resetResolvedDrawables() { /** * @hide */ protected void resetResolvedDrawables() { mPrivateFlags2 &= ~PFLAG2_DRAWABLE_RESOLVED; } Loading Loading @@ -14828,14 +14832,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (isRtlCompatibilityMode()) { mPaddingLeft = mUserPaddingLeftInitial; mPaddingRight = mUserPaddingRightInitial; } else { return; } if (isLayoutRtl()) { mPaddingLeft = mUserPaddingRightInitial; mPaddingRight = mUserPaddingLeftInitial; mPaddingLeft = (mUserPaddingEnd >= 0) ? mUserPaddingEnd : mUserPaddingLeftInitial; mPaddingRight = (mUserPaddingStart >= 0) ? mUserPaddingStart : mUserPaddingRightInitial; } else { mPaddingLeft = mUserPaddingLeftInitial; mPaddingRight = mUserPaddingRightInitial; } mPaddingLeft = (mUserPaddingStart >= 0) ? mUserPaddingStart : mUserPaddingLeftInitial; mPaddingRight = (mUserPaddingEnd >= 0) ? mUserPaddingEnd : mUserPaddingRightInitial; } }
core/java/android/view/ViewGroup.java +92 −0 Original line number Diff line number Diff line Loading @@ -5350,6 +5350,21 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } } /** * @hide */ @Override public void resolveRtlPropertiesIfNeeded() { super.resolveRtlPropertiesIfNeeded(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resolveRtlPropertiesIfNeeded(); } } } /** * @hide */ Loading Loading @@ -5404,6 +5419,51 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager return result; } /** * @hide */ @Override public void resolvePadding() { super.resolvePadding(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resolvePadding(); } } } /** * @hide */ @Override protected void resolveDrawables() { super.resolveDrawables(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resolveDrawables(); } } } /** * @hide */ @Override public void resetRtlProperties() { super.resetRtlProperties(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resetRtlProperties(); } } } /** * @hide */ Loading Loading @@ -5452,6 +5512,38 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } } /** * @hide */ @Override public void resetResolvedPadding() { super.resetResolvedPadding(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resetResolvedPadding(); } } } /** * @hide */ @Override protected void resetResolvedDrawables() { super.resetResolvedDrawables(); int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.isLayoutDirectionInherited()) { child.resetResolvedDrawables(); } } } /** * Return true if the pressed state should be delayed for children or descendants of this * ViewGroup. Generally, this should be done for containers that can scroll, such as a List. Loading
core/java/android/widget/CheckedTextView.java +2 −13 Original line number Diff line number Diff line Loading @@ -188,10 +188,11 @@ public class CheckedTextView extends TextView implements Checkable { resetPaddingToInitialValues(); int newPadding = (mCheckMarkDrawable != null) ? mCheckMarkWidth + mBasePadding : mBasePadding; mNeedRequestlayout |= (mPaddingRight != newPadding); if (isLayoutRtl()) { mNeedRequestlayout |= (mPaddingLeft != newPadding); mPaddingLeft = newPadding; } else { mNeedRequestlayout |= (mPaddingRight != newPadding); mPaddingRight = newPadding; } if (mNeedRequestlayout) { Loading @@ -200,18 +201,6 @@ public class CheckedTextView extends TextView implements Checkable { } } @Override public void setPadding(int left, int top, int right, int bottom) { super.setPadding(left, top, right, bottom); setBasePadding(isLayoutRtl()); } @Override public void setPaddingRelative(int start, int top, int end, int bottom) { super.setPaddingRelative(start, top, end, bottom); setBasePadding(isLayoutRtl()); } private void setBasePadding(boolean isLayoutRtl) { if (isLayoutRtl) { mBasePadding = mPaddingLeft; Loading