question: public int addItem ( String label , float value , int color ) { Item it = new Item ( ) ; it . mLabel = label ; it . mColor = color ; it . mValue = value ; it . mHighlight = Color . argb ( 0xff , Math . min ( ( int ) ( mHighlightStrength * ( float ) Color . red ( color ) ) , 0xff ) , Math . min ( ( int ) ( mHighlightStrength * ( float ) Color . green ( color ) ) , 0xff ) , Math . min ( ( int ) ( mHighlightStrength * ( float ) Color . blue ( color ) ) , 0xff ) ) ; mTotal += value ; mData . add ( it ) ; onDataChanged ( ) ; return mData . size ( ) - 1 ; }
target:  Add a new data item to this view. Adding an item adds a slice to the pie whose size is proportional to the item's value. As new items are added, the size of each existing slice is recalculated so that the proportions remain correct.