2016-05-03 8 views
0

私はsetDotColorsetDotColorSelectedで色を変えようとしましたが、色やサイズを変更する別の方法はありますか?アンドロイドウェアのDotsPageIndicatorのデフォルトサイズと色を変更したいですか? 、サードパーティの図書館はありますか? 私のコード:私のために働いた次の色についてアンドロイドの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); 

答えて

1

:この投稿へ

mDotsPageIndicator.setDotRadius((int) (mDotsPageIndicator.getDotRadius())); 

すべての感謝:

は、塗料を更新するには、ドットの半径を設定します。ペイントを更新した後、ビューを再描画します。

https://stackoverflow.com/a/34192263/4072710

関連する問題