Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -23310,6 +23310,7 @@ package android.view { method protected void onMeasure(int, int); method protected void onOverScrolled(int, int, boolean, boolean); method public void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent); method public void onResolvePadding(int); method protected void onRestoreInstanceState(android.os.Parcelable); method protected android.os.Parcelable onSaveInstanceState(); method protected void onScrollChanged(int, int, int, int); Loading Loading @@ -23345,6 +23346,7 @@ package android.view { method public boolean requestRectangleOnScreen(android.graphics.Rect); method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean); method protected void resetResolvedTextDirection(); method public void resolvePadding(); method public static int resolveSize(int, int); method public static int resolveSizeAndState(int, int, int); method protected void resolveTextDirection(); core/java/android/view/View.java +18 −3 Original line number Diff line number Diff line Loading @@ -9580,14 +9580,15 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * @hide * Force padding depending on layout direction. */ protected void resolvePadding() { public void resolvePadding() { // If the user specified the absolute padding (either with android:padding or // android:paddingLeft/Top/Right/Bottom), use this padding, otherwise // use the default padding or the padding from the background drawable // (stored at this point in mPadding*) switch (getResolvedLayoutDirection()) { int resolvedLayoutDirection = getResolvedLayoutDirection(); switch (resolvedLayoutDirection) { case LAYOUT_DIRECTION_RTL: // Start user padding override Right user padding. Otherwise, if Right user // padding is not defined, use the default Right padding. If Right user padding Loading Loading @@ -9623,6 +9624,20 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal mUserPaddingBottom = (mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom; recomputePadding(); onResolvePadding(resolvedLayoutDirection); } /** * Resolve padding depending on the layout direction. Subclasses that care about * padding resolution should override this method. The default implementation does * nothing. * * @param layoutDirection the direction of the layout * * {@link View#LAYOUT_DIRECTION_LTR} * {@link View#LAYOUT_DIRECTION_RTL} */ public void onResolvePadding(int layoutDirection) { } /** Loading core/java/android/widget/CheckedTextView.java +1 −5 Original line number Diff line number Diff line Loading @@ -142,12 +142,8 @@ public class CheckedTextView extends TextView implements Checkable { resolvePadding(); } /** * @hide */ @Override protected void resolvePadding() { super.resolvePadding(); public void onResolvePadding(int layoutDirection) { int newPadding = (mCheckMarkDrawable != null) ? mCheckMarkWidth + mBasePadding : mBasePadding; mNeedRequestlayout |= (mPaddingRight != newPadding); Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -23310,6 +23310,7 @@ package android.view { method protected void onMeasure(int, int); method protected void onOverScrolled(int, int, boolean, boolean); method public void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent); method public void onResolvePadding(int); method protected void onRestoreInstanceState(android.os.Parcelable); method protected android.os.Parcelable onSaveInstanceState(); method protected void onScrollChanged(int, int, int, int); Loading Loading @@ -23345,6 +23346,7 @@ package android.view { method public boolean requestRectangleOnScreen(android.graphics.Rect); method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean); method protected void resetResolvedTextDirection(); method public void resolvePadding(); method public static int resolveSize(int, int); method public static int resolveSizeAndState(int, int, int); method protected void resolveTextDirection();
core/java/android/view/View.java +18 −3 Original line number Diff line number Diff line Loading @@ -9580,14 +9580,15 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * @hide * Force padding depending on layout direction. */ protected void resolvePadding() { public void resolvePadding() { // If the user specified the absolute padding (either with android:padding or // android:paddingLeft/Top/Right/Bottom), use this padding, otherwise // use the default padding or the padding from the background drawable // (stored at this point in mPadding*) switch (getResolvedLayoutDirection()) { int resolvedLayoutDirection = getResolvedLayoutDirection(); switch (resolvedLayoutDirection) { case LAYOUT_DIRECTION_RTL: // Start user padding override Right user padding. Otherwise, if Right user // padding is not defined, use the default Right padding. If Right user padding Loading Loading @@ -9623,6 +9624,20 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal mUserPaddingBottom = (mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom; recomputePadding(); onResolvePadding(resolvedLayoutDirection); } /** * Resolve padding depending on the layout direction. Subclasses that care about * padding resolution should override this method. The default implementation does * nothing. * * @param layoutDirection the direction of the layout * * {@link View#LAYOUT_DIRECTION_LTR} * {@link View#LAYOUT_DIRECTION_RTL} */ public void onResolvePadding(int layoutDirection) { } /** Loading
core/java/android/widget/CheckedTextView.java +1 −5 Original line number Diff line number Diff line Loading @@ -142,12 +142,8 @@ public class CheckedTextView extends TextView implements Checkable { resolvePadding(); } /** * @hide */ @Override protected void resolvePadding() { super.resolvePadding(); public void onResolvePadding(int layoutDirection) { int newPadding = (mCheckMarkDrawable != null) ? mCheckMarkWidth + mBasePadding : mBasePadding; mNeedRequestlayout |= (mPaddingRight != newPadding); Loading