TabWidget without title

人盡茶涼 提交于 2019-12-12 03:06:28

问题


I'm trying to make a ViewPager that slides between fragments and a custom slidebar, that shows which page is selected.

Should be like this:

I don't want to display tab titles, only the bar itself. How can i do this?


回答1:


You can do this by following a trick. Like as, First remove your all title from tab then make same color your layout and tablayout background.




回答2:


you can use

ViewPager 

with

CircleIndicator - can be customized.

in gradle:

compile 'me.relex:circleindicator:1.1.8@aar'

you can look sample here



来源:https://stackoverflow.com/questions/37489488/tabwidget-without-title

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!