Esempio n. 1
0
 public void add(SliderItem item, int position) {
   if (item.mSliderMenu != null) {
     throw new IllegalArgumentException(
         "Item already has a parent: " + item + " (" + item.mSliderMenu + ")");
   }
   item.mSliderMenu = this;
   mItems.add(position, item);
   notifyChanged();
 }
Esempio n. 2
0
 public void remove(SliderItem item) {
   if (mItems.remove(item)) {
     item.mSliderMenu = null;
   }
   notifyChanged();
 }