@Override protected void onStart() { super.onStart(); myAllItems.clear(); final Intent intent = getIntent(); myAllItems.add(new SectionItem("enabled")); final List<String> enabledIds = intent.getStringArrayListExtra(NetworkLibraryActivity.ENABLED_CATALOG_IDS_KEY); if (enabledIds.size() > 0) { final TreeSet<CatalogItem> cItems = new TreeSet<CatalogItem>(); for (String id : enabledIds) { final NetworkTree tree = NetworkLibrary.Instance().getCatalogTreeByUrlAll(id); if (tree != null && tree.getLink() != null) { cItems.add(new CatalogItem(id, true, tree)); } } myAllItems.addAll(cItems); mySelectedItems.addAll(cItems); } myAllItems.add(new SectionItem("disabled")); final List<String> disabledIds = intent.getStringArrayListExtra(NetworkLibraryActivity.DISABLED_CATALOG_IDS_KEY); if (disabledIds.size() > 0) { final TreeSet<CatalogItem> cItems = new TreeSet<CatalogItem>(); for (String id : disabledIds) { cItems.add( new CatalogItem(id, false, NetworkLibrary.Instance().getCatalogTreeByUrlAll(id))); } myAllItems.addAll(cItems); } setListAdapter(new CatalogsListAdapter()); }
public String getTitle() { return Tree.getLink().getTitle(); }
@Override public void removeItems(Set<NetworkLibraryItem> items) { ChildrenItems.removeAll(items); super.removeItems(items); }