Loading api/current.txt +5 −3 Original line number Diff line number Diff line Loading @@ -23344,10 +23344,12 @@ package android.view { method protected void onLayout(boolean, int, int, int, int); method protected void onMeasure(int, int); method protected void onOverScrolled(int, int, boolean, boolean); method public void onPaddingChanged(int); method public void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent); method public void onResetResolvedTextDirection(); method public void onResolvePadding(int); method public void onResolveTextDirection(); method public void onResolvedLayoutDirectionChanged(); method public void onResolvedLayoutDirectionReset(); method public void onResolvedTextDirectionChanged(); method public void onResolvedTextDirectionReset(); method protected void onRestoreInstanceState(android.os.Parcelable); method protected android.os.Parcelable onSaveInstanceState(); method protected void onScrollChanged(int, int, int, int); core/java/android/view/View.java +36 −16 Original line number Diff line number Diff line Loading @@ -9598,10 +9598,19 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal // Set to resolved mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED; onResolvedLayoutDirectionChanged(); } /** * Force padding depending on layout direction. * Called when layout direction has been resolved. * * The default implementation does nothing. */ public void onResolvedLayoutDirectionChanged() { } /** * Resolve padding depending on layout direction. */ public void resolvePadding() { // If the user specified the absolute padding (either with android:padding or Loading Loading @@ -9645,7 +9654,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal mUserPaddingBottom = (mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom; recomputePadding(); onResolvePadding(resolvedLayoutDirection); onPaddingChanged(resolvedLayoutDirection); } /** Loading @@ -9656,7 +9665,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * @param layoutDirection the direction of the layout * */ public void onResolvePadding(int layoutDirection) { public void onPaddingChanged(int layoutDirection) { } /** Loading @@ -9674,19 +9683,28 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Reset the resolved layout direction. * * Subclasses need to override this method to clear cached information that depends on the * resolved layout direction, or to inform child views that inherit their layout direction. * Overrides must also call the superclass implementation at the start of their implementation. * Reset the resolved layout direction. Will call {@link View#onResolvedLayoutDirectionReset} * when reset is done. */ public void resetResolvedLayoutDirection() { // Reset the current View resolution mPrivateFlags2 &= ~LAYOUT_DIRECTION_RESOLVED; onResolvedLayoutDirectionReset(); // Reset also the text direction resetResolvedTextDirection(); } /** * Called during reset of resolved layout direction. * * Subclasses need to override this method to clear cached information that depends on the * resolved layout direction, or to inform child views that inherit their layout direction. * * The default implementation does nothing. */ public void onResolvedLayoutDirectionReset() { } /** * Check if a Locale uses an RTL script. * Loading Loading @@ -14137,8 +14155,8 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Resolve the text direction. Will call {@link View#onResolveTextDirection()} when resolution * is done. * Resolve the text direction. Will call {@link View#onResolvedTextDirectionChanged} when * resolution is done. */ public void resolveTextDirection() { if (mResolvedTextDirection != TEXT_DIRECTION_INHERIT) { Loading @@ -14152,24 +14170,26 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } else { mResolvedTextDirection = TEXT_DIRECTION_FIRST_STRONG; } onResolveTextDirection(); onResolvedTextDirectionChanged(); } /** * Called when text direction has been resolved. Subclasses that care about text direction * resolution should override this method. The default implementation does nothing. * resolution should override this method. * * The default implementation does nothing. */ public void onResolveTextDirection() { public void onResolvedTextDirectionChanged() { } /** * Reset resolved text direction. Text direction can be resolved with a call to * getResolvedTextDirection(). Will call {@link View#onResetResolvedTextDirection()} when * getResolvedTextDirection(). Will call {@link View#onResolvedTextDirectionReset} when * reset is done. */ public void resetResolvedTextDirection() { mResolvedTextDirection = TEXT_DIRECTION_INHERIT; onResetResolvedTextDirection(); onResolvedTextDirectionReset(); } /** Loading @@ -14177,7 +14197,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * override this method and do a reset of the text direction of their children. The default * implementation does nothing. */ public void onResetResolvedTextDirection() { public void onResolvedTextDirectionReset() { } // core/java/android/view/ViewGroup.java +2 −4 Original line number Diff line number Diff line Loading @@ -4920,9 +4920,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } @Override public void resetResolvedLayoutDirection() { super.resetResolvedLayoutDirection(); public void onResolvedLayoutDirectionReset() { // Take care of resetting the children resolution too final int count = getChildCount(); for (int i = 0; i < count; i++) { Loading @@ -4934,7 +4932,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } @Override public void onResetResolvedTextDirection() { public void onResolvedTextDirectionReset() { // Take care of resetting the children resolution too final int count = getChildCount(); for (int i = 0; i < count; i++) { Loading core/java/android/widget/CheckedTextView.java +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ public class CheckedTextView extends TextView implements Checkable { } @Override public void onResolvePadding(int layoutDirection) { public void onPaddingChanged(int layoutDirection) { int newPadding = (mCheckMarkDrawable != null) ? mCheckMarkWidth + mBasePadding : mBasePadding; mNeedRequestlayout |= (mPaddingRight != newPadding); Loading core/java/android/widget/TextView.java +1 −1 Original line number Diff line number Diff line Loading @@ -8715,7 +8715,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } @Override public void onResolveTextDirection() { public void onResolvedTextDirectionChanged() { if (hasPasswordTransformationMethod()) { // TODO: take care of the content direction to show the password text and dots justified // to the left or to the right Loading Loading
api/current.txt +5 −3 Original line number Diff line number Diff line Loading @@ -23344,10 +23344,12 @@ package android.view { method protected void onLayout(boolean, int, int, int, int); method protected void onMeasure(int, int); method protected void onOverScrolled(int, int, boolean, boolean); method public void onPaddingChanged(int); method public void onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent); method public void onResetResolvedTextDirection(); method public void onResolvePadding(int); method public void onResolveTextDirection(); method public void onResolvedLayoutDirectionChanged(); method public void onResolvedLayoutDirectionReset(); method public void onResolvedTextDirectionChanged(); method public void onResolvedTextDirectionReset(); method protected void onRestoreInstanceState(android.os.Parcelable); method protected android.os.Parcelable onSaveInstanceState(); method protected void onScrollChanged(int, int, int, int);
core/java/android/view/View.java +36 −16 Original line number Diff line number Diff line Loading @@ -9598,10 +9598,19 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal // Set to resolved mPrivateFlags2 |= LAYOUT_DIRECTION_RESOLVED; onResolvedLayoutDirectionChanged(); } /** * Force padding depending on layout direction. * Called when layout direction has been resolved. * * The default implementation does nothing. */ public void onResolvedLayoutDirectionChanged() { } /** * Resolve padding depending on layout direction. */ public void resolvePadding() { // If the user specified the absolute padding (either with android:padding or Loading Loading @@ -9645,7 +9654,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal mUserPaddingBottom = (mUserPaddingBottom >= 0) ? mUserPaddingBottom : mPaddingBottom; recomputePadding(); onResolvePadding(resolvedLayoutDirection); onPaddingChanged(resolvedLayoutDirection); } /** Loading @@ -9656,7 +9665,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * @param layoutDirection the direction of the layout * */ public void onResolvePadding(int layoutDirection) { public void onPaddingChanged(int layoutDirection) { } /** Loading @@ -9674,19 +9683,28 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Reset the resolved layout direction. * * Subclasses need to override this method to clear cached information that depends on the * resolved layout direction, or to inform child views that inherit their layout direction. * Overrides must also call the superclass implementation at the start of their implementation. * Reset the resolved layout direction. Will call {@link View#onResolvedLayoutDirectionReset} * when reset is done. */ public void resetResolvedLayoutDirection() { // Reset the current View resolution mPrivateFlags2 &= ~LAYOUT_DIRECTION_RESOLVED; onResolvedLayoutDirectionReset(); // Reset also the text direction resetResolvedTextDirection(); } /** * Called during reset of resolved layout direction. * * Subclasses need to override this method to clear cached information that depends on the * resolved layout direction, or to inform child views that inherit their layout direction. * * The default implementation does nothing. */ public void onResolvedLayoutDirectionReset() { } /** * Check if a Locale uses an RTL script. * Loading Loading @@ -14137,8 +14155,8 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } /** * Resolve the text direction. Will call {@link View#onResolveTextDirection()} when resolution * is done. * Resolve the text direction. Will call {@link View#onResolvedTextDirectionChanged} when * resolution is done. */ public void resolveTextDirection() { if (mResolvedTextDirection != TEXT_DIRECTION_INHERIT) { Loading @@ -14152,24 +14170,26 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal } else { mResolvedTextDirection = TEXT_DIRECTION_FIRST_STRONG; } onResolveTextDirection(); onResolvedTextDirectionChanged(); } /** * Called when text direction has been resolved. Subclasses that care about text direction * resolution should override this method. The default implementation does nothing. * resolution should override this method. * * The default implementation does nothing. */ public void onResolveTextDirection() { public void onResolvedTextDirectionChanged() { } /** * Reset resolved text direction. Text direction can be resolved with a call to * getResolvedTextDirection(). Will call {@link View#onResetResolvedTextDirection()} when * getResolvedTextDirection(). Will call {@link View#onResolvedTextDirectionReset} when * reset is done. */ public void resetResolvedTextDirection() { mResolvedTextDirection = TEXT_DIRECTION_INHERIT; onResetResolvedTextDirection(); onResolvedTextDirectionReset(); } /** Loading @@ -14177,7 +14197,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal * override this method and do a reset of the text direction of their children. The default * implementation does nothing. */ public void onResetResolvedTextDirection() { public void onResolvedTextDirectionReset() { } //
core/java/android/view/ViewGroup.java +2 −4 Original line number Diff line number Diff line Loading @@ -4920,9 +4920,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } @Override public void resetResolvedLayoutDirection() { super.resetResolvedLayoutDirection(); public void onResolvedLayoutDirectionReset() { // Take care of resetting the children resolution too final int count = getChildCount(); for (int i = 0; i < count; i++) { Loading @@ -4934,7 +4932,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } @Override public void onResetResolvedTextDirection() { public void onResolvedTextDirectionReset() { // Take care of resetting the children resolution too final int count = getChildCount(); for (int i = 0; i < count; i++) { Loading
core/java/android/widget/CheckedTextView.java +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ public class CheckedTextView extends TextView implements Checkable { } @Override public void onResolvePadding(int layoutDirection) { public void onPaddingChanged(int layoutDirection) { int newPadding = (mCheckMarkDrawable != null) ? mCheckMarkWidth + mBasePadding : mBasePadding; mNeedRequestlayout |= (mPaddingRight != newPadding); Loading
core/java/android/widget/TextView.java +1 −1 Original line number Diff line number Diff line Loading @@ -8715,7 +8715,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } @Override public void onResolveTextDirection() { public void onResolvedTextDirectionChanged() { if (hasPasswordTransformationMethod()) { // TODO: take care of the content direction to show the password text and dots justified // to the left or to the right Loading