private void makeShapes() {
activeDrawable = new ShapeDrawable();
inactiveDrawable = new ShapeDrawable();
activeDrawable.setBounds(0, 0, (int) mIndicatorSize,
(int) mIndicatorSize);
inactiveDrawable.setBounds(0, 0, (int) mIndicatorSize,
(int) mIndicatorSize);
int i[] = new int[2];
i[0] = android.R.attr.textColorSecondary;
i[1] = android.R.attr.textColorSecondaryInverse;
TypedArray a = this.getTheme().obtainStyledAttributes(i);
Shape s1 = new OvalShape();
s1.resize(mIndicatorSize, mIndicatorSize);
Shape s2 = new OvalShape();
s2.resize(mIndicatorSize, mIndicatorSize);
((ShapeDrawable) activeDrawable).getPaint().setColor(
a.getColor(0, Color.DKGRAY));
((ShapeDrawable) inactiveDrawable).getPaint().setColor(
a.getColor(1, Color.LTGRAY));
((ShapeDrawable) activeDrawable).setShape(s1);
((ShapeDrawable) inactiveDrawable).setShape(s2);
}
GradientDrawable bgShape = new GradientDrawable();
bgShape.setBounds(0, 0, tv.getWidth(), tv.getHeight());
bgShape.setCornerRadius(10);
bgShape.setStroke(2, base.UIColor.cBlue1);
tv.setBackground(bgShape);