Skip to content

Instantly share code, notes, and snippets.

@Gazer
Created September 19, 2016 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gazer/5098ec213709d3bac7263d657cca6188 to your computer and use it in GitHub Desktop.
Save Gazer/5098ec213709d3bac7263d657cca6188 to your computer and use it in GitHub Desktop.
public class PagerIndicator extends View {
private Paint paint;
private Paint currentPaint;
private ViewPager pager;
private int desiredRadius;
private Rect bounds = new Rect();
// Constructors ...
private void setup() {
paint = new Paint();
paint.setColor(Color.LTGRAY);
paint.setStyle(Paint.Style.FILL_AND_STROKE);
paint.setAntiAlias(true);
currentPaint = new Paint();
currentPaint.setColor(Color.WHITE);
currentPaint.setStyle(Paint.Style.FILL_AND_STROKE);
currentPaint.setAntiAlias(true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment