简体   繁体   中英

How can I change header layout every time swipe view pager(with tab layout)

I did design xml layout with drawerLayout + appBarLayout + collapsingLayout + header custom layout(imageView, textView and so on) + toolbar + tabLayout + viewPager by using Material Design.

But, I just want header custom layout to be changed dynamically every time view page(ex: fragment) is swiped and changed.

How can I do? I think that it makes sense to assign other header after inflating (other header)view to variable of header dynamically every time page swiped.

Thank you if you explain to me solution with example.

尝试查找视图寻呼机更改侦听器,并在更改侦听器中定义自定义的标头视图代码。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM