Here are the examples of the java api class com.google.blockly.android.ui.BlockListView taken from open source projects.
1. TrashFragment#onCreateView()
Project: blockly-android
File: TrashFragment.java
File: TrashFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); // Read configure readArgumentsFromBundle(getArguments()); // Overwrite initial state with stored state. readArgumentsFromBundle(savedInstanceState); mBlockListView = new BlockListView(getContext()); mBlockListView.setLayoutManager(createLinearLayoutManager()); mBlockListView.setBackgroundColor(// Replace with attribute getResources().getColor(R.color.blockly_trash_bg)); maybeInitListView(); return mBlockListView; }
2. ToolboxFragment#onCreateView()
Project: blockly-android
File: ToolboxFragment.java
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; }