Skip to content

Examples

Yannick Signer edited this page Dec 26, 2016 · 8 revisions

example nr. 1

example one

SquareProgressBar squareProgressBar = (SquareProgressBar) rootView.findViewById(R.id.sprogressbar);
squareProgressBar.setImage(R.drawable.cup);
squareProgressBar.setProgress(50);
squareProgressBar.setHoloColor(color.holo_green_dark);
squareProgressBar.setWidth(5);

example nr. 2

example two

SquareProgressBar squareProgressBar = (SquareProgressBar) rootView.findViewById(R.id.sprogressbar);
squareProgressBar.setImage(R.drawable.cup);
squareProgressBar.setProgress(20);
squareProgressBar.setColor("#E5C100");
squareProgressBar.drawOutline(true);

example nr. 3

example three

SquareProgressBar squareProgressBar = (SquareProgressBar) rootView.findViewById(R.id.sprogressbar);
squareProgressBar.setImage(R.drawable.cup);
squareProgressBar.setProgress(75);
squareProgressBar.setColorRGB(111, 111, 89);
squareProgressBar.setOpacity(true, true);
squareProgressBar.showProgress(true);
PercentStyle percentStyle = new PercentStyle(Align.CENTER, 270, true);
percentStyle.setTextColor(Color.rgb(111, 111, 89));
squareProgressBar.setPercentStyle(percentStyle);

example nr. 4

example four

SquareProgressBar squareProgressBar = (SquareProgressBar) view.findViewById(R.id.sprogressbar);
    
Bitmap bmp = Bitmap.createBitmap(250, 250, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bmp);
Paint paint = new Paint();
paint.setTextSize(60);
paint.setTextAlign(Paint.Align.CENTER);
paint.setColor(Color.parseColor("#D11111"));
canvas.drawText("Crimbo!",125,155, paint);
squareProgressBar.setImageBitmap(bmp);

squareProgressBar.setHoloColor(android.R.color.holo_green_light);
squareProgressBar.setProgress(32);
squareProgressBar.setWidth(8);
squareProgressBar.setOpacity(false);
Clone this wiki locally
You can’t perform that action at this time.