【发布时间】:2014-10-30 00:26:47
【问题描述】:
我有一个使用 PagerTabStrip 来指示当前页面的 viewpager。 但是,我不希望出现默认指示器。 (页面标题下划线)
我尝试了几种不同的方法来删除它,但似乎都不起作用。
PagerTabStrip pts = (PagerTabStrip) findViewById(R.id.pager_title_strip); pts.setTabIndicatorColor(getResources().getColor(android.R.color.transparent));
还有
PagerTabStrip pts = (PagerTabStrip) findViewById(R.id.pager_title_strip); pts.setTabIndicatorColor(Color.parseColor("#80000000"));
和
PagerTabStrip pts = (PagerTabStrip) findViewById(R.id.pager_title_strip); pts.setTabIndicatorColor(Color.TRANSPARENT);
这些似乎都不起作用。相反,它给了我一个黑色指示器。 任何帮助,将不胜感激。谢谢!
【问题讨论】:
标签: java android android-viewpager viewpagerindicator