Beispiel #1
0
 private Item createItem(String label, float val) {
   return createItem(
       label,
       PieConstants.getSliceItemPercentage(val),
       PieConstants.getSliceColor(getResources(), label),
       PieConstants.getItemColor(getResources(), label));
 }
Beispiel #2
0
 // This allows the user only to add the label and the percent of the slice. The colors are auto
 // generated.
 public int addItem(String label, float val) {
   return addItem(
       label,
       PieConstants.getSliceItemPercentage(val),
       PieConstants.getSliceColor(getResources(), label),
       PieConstants.getItemColor(getResources(), label));
 }