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.adapter; // w w w. j a va 2 s . c o m import com.google.common.eventbus.Subscribe; import net.sledzdev.shoppinglist.event.NewListEvent; import net.sledzdev.shoppinglist.event.NewListRequestEvent; import net.sledzdev.shoppinglist.event.UpdateListAdapterEvent; public class ShoppingListAdapterEventsHandler { private final ShoppingListsAdapter shoppingListsAdapter; public ShoppingListAdapterEventsHandler(ShoppingListsAdapter shoppingListsAdapter) { this.shoppingListsAdapter = shoppingListsAdapter; } @Subscribe public void onListTitleChanged(UpdateListAdapterEvent event) { shoppingListsAdapter.notifyDataSetChanged(); } @Subscribe public void onNewListRequest(NewListRequestEvent event) { shoppingListsAdapter.getEventBus().post(new NewListEvent(shoppingListsAdapter)); } }