Code example for ArrayList

Methods: clear

0
    public void addSlice(long value, int color) {
        mSlices.add(new Slice(value, color));
    } 
 
    public void removeAllSlices() { 
        mSlices.clear();
    } 
 
    @Override 
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        final float centerX = getWidth() / 2;
        final float centerY = getHeight() / 2;
 
        mMatrix.reset();
        mMatrix.postScale(0.665f, 0.95f, centerX, centerY);
        mMatrix.postRotate(-40, centerX, centerY);
 
        generatePath(); 
    } 
 
    public void generatePath() {