@@ -11560,7 +11560,7 @@ void resolveRtlPropertiesIfNeeded() {
1156011560 }
1156111561 requestLayout();
1156211562 invalidate(true);
11563- onRtlPropertiesChanged();
11563+ onRtlPropertiesChanged(getLayoutDirection() );
1156411564 }
1156511565
1156611566 // Reset resolution of all RTL related properties.
@@ -11622,8 +11622,13 @@ private boolean needRtlPropertiesResolution() {
1162211622 * resolved layout direction, or to inform child views that inherit their layout direction.
1162311623 *
1162411624 * The default implementation does nothing.
11625+ *
11626+ * @param layoutDirection the direction of the layout
11627+ *
11628+ * @see #LAYOUT_DIRECTION_LTR
11629+ * @see #LAYOUT_DIRECTION_RTL
1162511630 */
11626- public void onRtlPropertiesChanged() {
11631+ public void onRtlPropertiesChanged(int layoutDirection ) {
1162711632 }
1162811633
1162911634 /**
@@ -11768,7 +11773,7 @@ public void resolvePadding() {
1176811773
1176911774 internalSetPadding(mUserPaddingLeft, mPaddingTop, mUserPaddingRight,
1177011775 mUserPaddingBottom);
11771- onPaddingChanged (resolvedLayoutDirection);
11776+ onRtlPropertiesChanged (resolvedLayoutDirection);
1177211777 }
1177311778
1177411779 mPrivateFlags2 |= PFLAG2_PADDING_RESOLVED;
@@ -11783,19 +11788,6 @@ public void resetResolvedPadding() {
1178311788 mPrivateFlags2 &= ~PFLAG2_PADDING_RESOLVED;
1178411789 }
1178511790
11786- /**
11787- * Resolve padding depending on the layout direction. Subclasses that care about
11788- * padding resolution should override this method. The default implementation does
11789- * nothing.
11790- *
11791- * @param layoutDirection the direction of the layout
11792- *
11793- * @see #LAYOUT_DIRECTION_LTR
11794- * @see #LAYOUT_DIRECTION_RTL
11795- */
11796- public void onPaddingChanged(int layoutDirection) {
11797- }
11798-
1179911791 /**
1180011792 * This is called when the view is detached from a window. At this point it
1180111793 * no longer has a surface for drawing.
@@ -11827,7 +11819,7 @@ protected void onDetachedFromWindow() {
1182711819 mCurrentAnimation = null;
1182811820
1182911821 resetRtlProperties();
11830- onRtlPropertiesChanged();
11822+ onRtlPropertiesChanged(LAYOUT_DIRECTION_DEFAULT );
1183111823 resetAccessibilityStateChanged();
1183211824 }
1183311825
@@ -16618,7 +16610,7 @@ public void setTextDirection(int textDirection) {
1661816610 // Do resolution
1661916611 resolveTextDirection();
1662016612 // Notify change
16621- onRtlPropertiesChanged();
16613+ onRtlPropertiesChanged(getLayoutDirection() );
1662216614 // Refresh
1662316615 requestLayout();
1662416616 invalidate(true);
@@ -16812,7 +16804,7 @@ public void setTextAlignment(int textAlignment) {
1681216804 // Do resolution
1681316805 resolveTextAlignment();
1681416806 // Notify change
16815- onRtlPropertiesChanged();
16807+ onRtlPropertiesChanged(getLayoutDirection() );
1681616808 // Refresh
1681716809 requestLayout();
1681816810 invalidate(true);
0 commit comments