AnimPiecharView/src/main/java/com/kv/animpiecharview/view/PieCharView.java
private void calculatePieAngle() {
        float totalPieAngle = 0;
        PieCharBean pieCharBean;
        if (mPieCharBeanList.size() > 1) {
            for (int i = 0; i < mPieCharBeanList.size() - 1; i++) {
                pieCharBean = mPieCharBeanList.get(i);
                pieCharBean.setAngleSize(pieCharBean.getPercentage() * 360 / 100);
                pieCharBean.setAngleStart(totalPieAngle);
                totalPieAngle += pieCharBean.getAngleSize();
                pieCharBean.setAngleEnd(totalPieAngle);
            }
        }

        //the last
        pieCharBean = mPieCharBeanList.get(mPieCharBeanList.size() - 1);
        pieCharBean.setAngleStart(totalPieAngle);
        pieCharBean.setAngleSize(360 - totalPieAngle);
        pieCharBean.setAngleEnd(360);
    }
/**
     * avoid pie angle trans by 360 missing piece
     * Calculate pie angle.
     */
avoid pie angle trans by 360 missing piece
Calculate pie angle.
avoid pie angle trans by 360 missing piece Calculate pie angle .
private void calculatePieAngle() {
        float totalPieAngle = 0;
        PieCharBean pieCharBean;
        if (mPieCharBeanList.size() > 1) {
            for (int i = 0; i < mPieCharBeanList.size() - 1; i++) {
                pieCharBean = mPieCharBeanList.get(i);
                pieCharBean.setAngleSize(pieCharBean.getPercentage() * 360 / 100);
                pieCharBean.setAngleStart(totalPieAngle);
                totalPieAngle += pieCharBean.getAngleSize();
                pieCharBean.setAngleEnd(totalPieAngle);
            }
        }
        pieCharBean = mPieCharBeanList.get(mPieCharBeanList.size() - 1);
        pieCharBean.setAngleStart(totalPieAngle);
        pieCharBean.setAngleSize(360 - totalPieAngle);
        pieCharBean.setAngleEnd(360);
    }
private void calculatePieAngle ( ) { float totalPieAngle = 0 ; PieCharBean pieCharBean ; if ( mPieCharBeanList . size ( ) > 1 ) { for ( int i = 0 ; i < mPieCharBeanList . size ( ) - 1 ; i ++ ) { pieCharBean = mPieCharBeanList . get ( i ) ; pieCharBean . setAngleSize ( pieCharBean . getPercentage ( ) * 360 / 100 ) ; pieCharBean . setAngleStart ( totalPieAngle ) ; totalPieAngle += pieCharBean . getAngleSize ( ) ; pieCharBean . setAngleEnd ( totalPieAngle ) ; } } pieCharBean = mPieCharBeanList . get ( mPieCharBeanList . size ( ) - 1 ) ; pieCharBean . setAngleStart ( totalPieAngle ) ; pieCharBean . setAngleSize ( 360 - totalPieAngle ) ; pieCharBean . setAngleEnd ( 360 ) ; }
avoid pie angle trans by 360 missing piece
 Calculate pie angle.
avoid pie angle trans by 360 missing piece Calculate pie angle .
//the last