com.google.blockly.android.ui.CategoryTabs

Here are the examples of the java api class com.google.blockly.android.ui.CategoryTabs taken from open source projects.

1. ToolboxFragment#onCreateView()

Project: blockly-android
File: ToolboxFragment.java
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // Read configure
    readArgumentsFromBundle(getArguments());
    // Overwrite initial state with stored state.
    readArgumentsFromBundle(savedInstanceState);
    mBlockListView = new BlockListView(getContext());
    mBlockListView.setLayoutManager(createLinearLayoutManager());
    mBlockListView.addItemDecoration(new BlocksItemDecoration());
    mBlockListView.setBackgroundColor(// Replace with attrib
    getResources().getColor(R.color.blockly_toolbox_bg));
    mCategoryTabs = new CategoryTabs(getContext());
    mCategoryTabs.setLabelAdapter(onCreateLabelAdapter());
    mCategoryTabs.setCallback(new CategoryTabs.Callback() {

        @Override
        public void onCategorySelected(ToolboxCategory category) {
            setCurrentCategory(category);
        }
    });
    mRootView = new ToolboxRoot(getContext());
    updateViews();
    return mRootView;
}