private void initIndicator() {
RelativeLayout mHeader = (RelativeLayout) findViewById(R.id.launch_head);
mIndicator = new IndicatorView(UIUtils.getContext());
//设置点和点之间的间隙
mIndicator.setInterval(10);
//设置点的图片
mIndicator.setIndicatorDrawable(UIUtils.getDrawable(R.drawable.indicator));
RelativeLayout.LayoutParams rl = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
rl.addRule(RelativeLayout.CENTER_HORIZONTAL);
rl.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
rl.setMargins(0, 0, 0, UIUtils.dip2px(15));
mIndicator.setLayoutParams(rl);
mIndicator.setCount(4);
mIndicator.setSelection(0);
mHeader.addView(mIndicator);
}