super(context, attrs);
setGravity(Gravity.CENTER);
setPadding(0, 4, 0, 4);
LayoutParams lp =
new LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
for (int i = 0; i < MAX_DOTS; i++) {
ImageView dotView = new ImageView(mContext);
dotView.setImageResource(R.drawable.page_indicator_unselected2);
addView(dotView, lp);
}