@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { GCBaseListable item = (GCBaseListable) mListView.getAdapter().getItem(position); if (item.getType() == UriData.TYPE_IR_CODE) { getProvider().transmit(((IrCode) item).getSignal()); } else { UriData clone = mUriData.clone(); select(clone, item); ((GCProviderActivity) getActivity()).addFragment(clone); } }
private void queryServer(boolean showDialog) { mListView.setAdapter(null); if (showDialog) showDialog(); if (mConnector != null) mConnector.cancelQuery(); mConnector = new DBConnector(getActivity(), this); mConnector.setOnDataReceivedListener(this); mConnector.query(mUriData.clone()); }