DylanCaiCoding / LoadingStateView

Decoupling the code of toolbar or loading status view. (深度解耦标题栏,解耦加载中、加载失败、无数据等缺省页,支持两行代码集成到基类)
Apache License 2.0
676 stars 53 forks source link

请教下,TitleAdapter如何改变标题 #18

Closed liangjianqi closed 3 years ago

liangjianqi commented 3 years ago

RT,需要在tablayout切换的时候变化title

DylanCaiCoding commented 3 years ago

就像用 RecyclerView 适配器一样,修改数据后调用 notifyDataSetChanged() 方法。也可以在创建 viewHolder 时保存 tabLayout 对象,然后暴露一个设置 tabLayout 标题的方法来调用。