dynamic-support
dynamic-support copied to clipboard
Сalling android.widget.FrameLayout incorrectly in material-1.11.0 due to DynamicBottomNavigationView
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)
I looked into the DynamicButtonNavigationView code and found the problem that in setTextColor(), which is called itemActiveIndicatorColor = DynamicResourceUtils.getColorStateList(activeColor)
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()
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.