Closed ljackChen001 closed 4 years ago
setContentView 只设置布局就会报错,必须要加入根布局的ID才可以
setToolbar("标题",NavIconType.BACK) 报错 Caused by: kotlin.TypeCastException: null cannot be cast to non-null type T
心累
java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to androidx.appcompat.widget.ActionBarOverlayLayout$LayoutParams
将主题设置成 NoActionBar 应该就没问题了,我有空排查下怎么造成的,这是 androidx 才有的,以前还是 support 版本时没有这个问题
setToolbar("标题",NavIconType.BACK) 报错 Caused by: kotlin.TypeCastException: null cannot be cast to non-null type T
心累
要注册一个 ViewType.TITLE 的全局适配器,适配器需要继承 BaseToolbarAdapter
我优化了基类代码和增加了注意事项的注释,你可以看下最新的代码
java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to androidx.appcompat.widget.ActionBarOverlayLayout$LayoutParams