dynamic-support icon indicating copy to clipboard operation
dynamic-support copied to clipboard

Сalling android.widget.FrameLayout incorrectly in material-1.11.0 due to DynamicBottomNavigationView

Open deadfan opened this issue 2 years ago • 3 comments

Description: DynamicBottomNavigationView causes logcat to be spammed with error

Expected behavior: View requestLayout() is incorrectly called by android.widget.FrameLayout{ea43075 VE...... ......ID 39,72-231,168 #7f0a049a app:id/navigation_bar_item_icon_container} during second layout pass: post next frame View requestLayout() incorrectly called by android.widget.FrameLayout{8c060b0 VE...... ......ID 39,72-231,168 #7f0a049a app:id/navigation_bar_item_icon_container} during layout: performing second layout pass The spam started after updating from 5.2.0 to 6.0.0 and continued until 6.3.0. I also installed the regular BottomNavigationView and the spam disappeared.

Android API version: Android API version. API 29

Library version: The Library version you are using. 6.3.0

Device: Device on which the bug was encountered. Honor 10i (Model: HRY-LX1T)

deadfan avatar Sep 17 '23 09:09 deadfan

I looked into the DynamicButtonNavigationView code and found the problem that in setTextColor(), which is called itemActiveIndicatorColor = DynamicResourceUtils.getColorStateList(activeColor)

deadfan avatar Sep 17 '23 10:09 deadfan

I used the DynamicBottonNavigationView source code to create my own and moved setItemRippleColor(DynamicResourceUtils.getColorStateList(Color.TRANSPARENT, activeColor, false)); setItemActiveIndicatorColor(DynamicResourceUtils.getColorStateList(activeColor)); in initialize()

deadfan avatar Sep 17 '23 12:09 deadfan

Hello! Thanks for the info and I appreciate your detailed analysis. I will look into it before reaching a conclusion.

Reopening the issue for now, please feel free to provide further info.

pranavpandey avatar Sep 17 '23 17:09 pranavpandey