Make UiUtils.computeMaxWidthOfListAdapterItems() use AbsListView.LayoutParams
Currently, this method uses LinearLayout.LayoutParams to measure the views in the ListView (this code was refactored out of DropdownPopupWindow). However, this causes a crash in certain situations on Android J and K (for example, adding a LinearLayout as a footer view, calling this method, and then later trying to measure a parent of the ListView) because LinearLayout.LayoutParams can't be cast to AbsListView.LayoutParams. This CL changes this code to use AbsListView.LayoutParams to avoid this crash. Bug: Change-Id: I90b68cd812155ac87bc089f95493cdd82de77395 Reviewed-on: https://chromium-review.googlesource.com/571600Reviewed-by:Theresa <twellington@chromium.org> Commit-Queue: Ryan Landay <rlanday@chromium.org> Cr-Commit-Position: refs/heads/master@{#486824}
Showing
Please register or sign in to comment