File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -10002,8 +10002,10 @@ public void setLayoutParams(ViewGroup.LayoutParams params) {
1000210002
1000310003 /**
1000410004 * Resolve the layout parameters depending on the resolved layout direction
10005+ *
10006+ * @hide
1000510007 */
10006- private void resolveLayoutParams() {
10008+ public void resolveLayoutParams() {
1000710009 if (mLayoutParams != null) {
1000810010 mLayoutParams.resolveLayoutDirection(getLayoutDirection());
1000910011 }
Original file line number Diff line number Diff line change @@ -5358,6 +5358,16 @@ protected void resolveDrawables() {
53585358 }
53595359 }
53605360
5361+ @ Override
5362+ public void resolveLayoutParams () {
5363+ super .resolveLayoutParams ();
5364+ int count = getChildCount ();
5365+ for (int i = 0 ; i < count ; i ++) {
5366+ final View child = getChildAt (i );
5367+ child .resolveLayoutParams ();
5368+ }
5369+ }
5370+
53615371 /**
53625372 * @hide
53635373 */
@@ -5981,6 +5991,11 @@ public int getLayoutDirection() {
59815991 */
59825992 @ Override
59835993 public void resolveLayoutDirection (int layoutDirection ) {
5994+ // No need to resolve if it is the same layout direction as before
5995+ if (this .layoutDirection == layoutDirection ) {
5996+ return ;
5997+ }
5998+
59845999 setLayoutDirection (layoutDirection );
59856000
59866001 if (!isMarginRelative ()) return ;
You can’t perform that action at this time.
0 commit comments