CategoryTabs.DefaultTabsAdapter

protected class CategoryTabs.DefaultTabsAdapter extends CategoryTabs.LabelAdapter

Manages TextView labels derived from default_toolbox_tab.

Protected Constructor Summary

Public Method Summary

void
onBindLabel(View labelView, BlocklyCategory category, int position)
Assigns the category name to the TextView.
View
onCreateLabel()
Create a label view for a tab.

Inherited Method Summary

Protected Constructors

protected CategoryTabs.DefaultTabsAdapter ()

Public Methods

public void onBindLabel (View labelView, BlocklyCategory category, int position)

Assigns the category name to the TextView. Tabs without labels will be assigned the text blockly_toolbox_default_category_name ("Blocks" in English).

Parameters
labelView The view used as the label.
category The BlocklyCategory.
position The ordering position of the tab.

public View onCreateLabel ()

Create a label view for a tab. This view will later be assigned an View.OnClickListener to handle tab selection and deselection.