use of net.osmand.plus.download.DownloadResourceGroup in project Osmand by osmandapp.
the class SearchDialogFragment method onItemClick.
@Override
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
Object obj = listAdapter.getItem(position);
if (obj instanceof DownloadResourceGroup) {
String uniqueId = ((DownloadResourceGroup) obj).getUniqueId();
final DownloadResourceGroupFragment regionDialogFragment = DownloadResourceGroupFragment.createInstance(uniqueId);
((DownloadActivity) getActivity()).showDialog(getActivity(), regionDialogFragment);
} else if (obj instanceof IndexItem) {
IndexItem indexItem = (IndexItem) obj;
ItemViewHolder vh = (ItemViewHolder) v.getTag();
View.OnClickListener ls = vh.getRightButtonAction(indexItem, vh.getClickAction(indexItem));
ls.onClick(v);
}
}
use of net.osmand.plus.download.DownloadResourceGroup in project Osmand by osmandapp.
the class DownloadResourceGroupFragment method onChildClick.
@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;
ItemViewHolder vh = (ItemViewHolder) v.getTag();
OnClickListener ls = vh.getRightButtonAction(indexItem, vh.getClickAction(indexItem));
ls.onClick(v);
return true;
}
return false;
}
Aggregations