Back to project page ShoppingList.
The source code is released under:
GNU General Public License
If you think the Android project ShoppingList listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.sledzdev.shoppinglist.handlers; //from w w w.j av a 2 s.com import com.google.common.eventbus.Subscribe; import net.sledzdev.shoppinglist.event.ItemDeleteEvent; import net.sledzdev.shoppinglist.manager.ContentManager; /** * Created by Mariusz on 26.01.14. */ public class ItemDeleteEventHandler { private ContentManager manager; public ItemDeleteEventHandler(ContentManager manager) { if (manager == null) { throw new IllegalArgumentException("ContentManager can't be null"); } this.manager = manager; } @Subscribe public void onItemDelete(ItemDeleteEvent event) { event.adapter.deleteItem(event.item.id); manager.remove(event.item); //TODO: animation } }