Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 817e9e6f authored by Walter Jang's avatar Walter Jang Committed by Android (Google) Code Review
Browse files

Merge "Force children to layout after listview layout." into ub-contactsdialer-h-dev

parents d0b2132f 80fc409d
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.contacts.common.list;

import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.widget.ListView;

@@ -114,4 +115,15 @@ public class AutoScrollListView extends ListView {
            smoothScrollToPositionFromTop(position, offset);
        }
    }

    @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        super.onLayout(changed, l, t, r, b);

        // Workaround for b/31160338.
        if (android.os.Build.VERSION.SDK_INT == Build.VERSION_CODES.N
            || android.os.Build.VERSION.SDK_INT == Build.VERSION_CODES.N_MR1) {
            layoutChildren();
        }
    }
}