Android ArcShape - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ArcShape class.

This code example shows how to use the following methods:
            mDrawables[3] = new ShapeDrawable(new RoundRectShape(outerR, inset,
                                                                 null)); 
            mDrawables[4] = new ShapeDrawable(new RoundRectShape(outerR, inset,
                                                                 innerR));
            mDrawables[5] = new ShapeDrawable(new PathShape(path, 100, 100));
            mDrawables[6] = new MyShapeDrawable(new ArcShape(45, -270));
 
            mDrawables[0].getPaint().setColor(0xFFFF0000);
            mDrawables[1].getPaint().setColor(0xFF00FF00);
            mDrawables[2].getPaint().setColor(0xFF0000FF);
            mDrawables[3].getPaint().setShader(makeSweep());
            mDrawables[4].getPaint().setShader(makeLinear());
            mDrawables[5].getPaint().setShader(makeTiling());
            mDrawables[6].getPaint().setColor(0x88FF8844);
 
            PathEffect pe = new DiscretePathEffect(10, 4);
            PathEffect pe2 = new CornerPathEffect(4);
            mDrawables[3].getPaint().setPathEffect(
                                                new ComposePathEffect(pe2, pe));
 
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
		int randomNumber = r.nextInt(4);
		 
		// in function of the random number, we create either a ArcShape, or a RoundRectShape, or a RectShape or a OvalShape 
		if (randomNumber == 0) 
		{  
			mDrawable = new ShapeDrawable(new ArcShape(r.nextInt(360),r.nextInt(360)));
		} 
		else if (randomNumber == 1) 
		{  
			float[] roundedCorner = new float[] { r.nextInt(400), r.nextInt(400), r.nextInt(400), r.nextInt(400), 
					r.nextInt(400), r.nextInt(400), r.nextInt(400), r.nextInt(400) };
			 
			mDrawable = new ShapeDrawable(new RoundRectShape(roundedCorner, null, null));
		} 
		else if (randomNumber == 2)
		{ 
			// rectangle figure 
			mDrawable = new ShapeDrawable(new RectShape());
		} 
		else if (randomNumber == 3)
Full Snippet Info
3
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
                d.setIntrinsicWidth(100);
                d.getPaint().setColor(Color.YELLOW);
                d.getPaint().setStyle(Paint.Style.STROKE);
                break; 
            case IDM_ARC:
                d = new ShapeDrawable(new ArcShape(0, 255));
                d.setIntrinsicHeight(100);
                d.setIntrinsicWidth(100);
                d.getPaint().setColor(Color.YELLOW);
                break; 
        } 
        mImage.setBackgroundDrawable(d);
        return true; 
    } 
} 
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
            d.setIntrinsicWidth(100);
            d.getPaint().setColor(Color.YELLOW);
            d.getPaint().setStyle(Paint.Style.STROKE);
            break; 
        case IDM_ARC:
            d = new ShapeDrawable(new ArcShape(0, 255));
            d.setIntrinsicHeight(100);
            d.setIntrinsicWidth(100);
            d.getPaint().setColor(Color.YELLOW);
            break; 
        } 
        mView.setDrawable(d);
        return true; 
    } 
} 
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:

Related Android ArcShape Questions & Answers:

See Code Examples for Android ArcShape Methods: