BlockRecyclerViewHelper.CategoryCallback

protected class BlockRecyclerViewHelper.CategoryCallback extends BlocklyCategory.Callback

Internal implementation that listens to changes to the category and refreshes the recycler view if it changes.

Protected Constructor Summary

Public Method Summary

void
onCategoryCleared()
Called when the category is cleared, which removes all its subcategories and items.
void
onItemAdded(int index, BlocklyCategory.CategoryItem item)
Called when an item is added to this category.
void
onItemRemoved(int index, BlocklyCategory.CategoryItem block)
Called when an item is removed from this category.

Inherited Method Summary

Protected Constructors

protected BlockRecyclerViewHelper.CategoryCallback ()

Public Methods

public void onCategoryCleared ()

Called when the category is cleared, which removes all its subcategories and items.

public void onItemAdded (int index, BlocklyCategory.CategoryItem item)

Called when an item is added to this category.

Parameters
index The index the item was added at.
item The item that was added.

public void onItemRemoved (int index, BlocklyCategory.CategoryItem block)

Called when an item is removed from this category.

Parameters
index The index the item was previously at.
block The item that was removed.