0
我想更改Android Wear中DotsPageIndicator的默認尺寸和顏色,我嘗試通過setDotColor
和setDotColorSelected
更改顏色,但noyhing更改,是否有另一種方法更改顏色和大小? ,有沒有第三方圖書館? 我的代碼:如何在Android Wear中更改DotsPageIndicator的佈局?
final GridViewPager pager = (GridViewPager) findViewById(R.id.pager);
pager.setAdapter(new LoggedinAdapter(this));
DotsPageIndicator dotsPageIndicator = (DotsPageIndicator) findViewById(R.id.page_indicator);
dotsPageIndicator.setDotColor(R.color.red);
dotsPageIndicator.setDotColorSelected(R.color.black);
dotsPageIndicator.setPager(pager);