@Override public void downloadInProgress() { if (banner != null) { banner.updateBannerInProgress(); } listAdapter.notifyDataSetChanged(); }
private void reloadData() { DownloadResources indexes = activity.getDownloadThread().getIndexes(); group = indexes.getGroupById(groupId); if (group != null) { listAdapter.update(group); toolbar.setTitle(group.getName(activity)); } expandAllGroups(); }
@Override public boolean onChildClick( ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { Object child = listAdapter.getChild(groupPosition, childPosition); if (child instanceof DownloadResourceGroup) { String uniqueId = ((DownloadResourceGroup) child).getUniqueId(); final DownloadResourceGroupFragment regionDialogFragment = DownloadResourceGroupFragment.createInstance(uniqueId); ((DownloadActivity) getActivity()).showDialog(getActivity(), regionDialogFragment); return true; } else if (child instanceof IndexItem) { IndexItem indexItem = (IndexItem) child; DownloadResourceGroup groupObj = listAdapter.getGroupObj(groupPosition); ItemViewHolder vh = (ItemViewHolder) v.getTag(); OnClickListener ls = vh.getRightButtonAction(indexItem, vh.getClickAction(indexItem), groupObj); ls.onClick(v); return true; } return false; }
private void expandAllGroups() { for (int i = 0; i < listAdapter.getGroupCount(); i++) { listView.expandGroup(i); } }