@ItemClick protected void listViewItemClicked(int position) { AttachmentFileObject data = mData.get(position); if (data.isFolder) { AttachmentsActivity_.intent(this) .mAttachmentFolderObject(data.folderObject) .mProjectObjectId(mProjectFileParam.getProjectId()) .mProject(mProjectFileParam.getProject()) .startForResult(ProjectAttachmentFragment.RESULT_REQUEST_FILES); } else if (data.isImage()) { AttachmentsPicDetailActivity_.intent(this) .mProjectObjectId(mProjectFileParam.getProjectId()) .mAttachmentFileObject(data) .startForResult(FILE_DELETE_CODE); } else { AttachmentsDownloadDetailActivity_.intent(this) .mProjectObjectId(mProjectFileParam.getProjectId()) .mHideHistoryLayout(true) .mAttachmentFileObject(data) .mProject(mProjectFileParam.getProject()) .startForResult(FILE_DELETE_CODE); } }
@ItemClick final void listView(MergeObject itemData) { Merge merge = new Merge(); merge.setId(itemData.getId()); merge.setSrcBranch(itemData.getSrcBranch()); merge.setDesBranch(itemData.getDesBranch()); merge.setCreated_at(itemData.getCreatedAt()); merge.setAuthor(itemData.getAuthor()); merge.setAction_at(itemData.getAction_at()); merge.setMerge_status(itemData.merge_status); merge.setContent(itemData.getBody()); merge.setIid(itemData.getIid()); merge.setTitle(itemData.getTitle()); merge.setPath(itemData.getPath()); Merge.ActionAuthor userObject = new Merge.ActionAuthor(); userObject.name = itemData.getAuthor().name; merge.setAction_author(userObject); MergeDetailActivity_.intent(this).mMerge(merge).start(); }
@ItemClick(R.id.arealist) @UiThread public void onItemClick(AreaResponse area) { if (getSelectListener() != null) notifySelected(area); else { SearchResultFragment targetFragment = SearchResultFragment.class.cast(Fragment.instantiate(getBackOpActivity(), targetClass)); targetFragment.tag = targetClass; // targetFragment.area = area; Bundle bundle = new Bundle(); bundle.putSerializable("area", area); targetFragment.setArguments(bundle); targetFragment.setManager(getFragmentManager()); targetFragment.setCustomAnimations(R.anim.anim_fragment_in, R.anim.anim_fragment_out, R.anim.anim_fragment_close_in, R.anim.anim_fragment_close_out); targetFragment.show(); } }
@Override @ItemClick(android.R.id.list) protected void onListItemClick(int position) { String path = listAdapter.getItem(position); if (isDirectory(path)) { super.onListItemClick(position); return; } if (!isValidDictionaryFile(path)) { activityHelper.showToast(getResources().getString( R.string.message_validation_file_ext, Joiner.on(" or ").join(DICTIONARY_EXT_LIST))); return; } Intent intent = getIntent(); intent.putExtra(RESULT_INTENT_PATH, currentFullPath); intent.putExtra(RESULT_INTENT_FILENAME, path); setResult(RESULT_OK, intent); finish(); }
@Override @ItemClick(android.R.id.list) protected void onListItemClick(int position) { String path = listAdapter.getItem(position); if (isDirectory(path)) { super.onListItemClick(position); return; } if (!isValidFontFile(path)) { activityHelper.showToast(getResources().getString( R.string.message_validation_file_ext, Joiner.on(" or ").join(FONT_EXT_LIST))); return; } Intent intent = getIntent(); intent.putExtra(RESULT_INTENT_PATH, currentFullPath); intent.putExtra(RESULT_INTENT_FILENAME, path); setResult(RESULT_OK, intent); finish(); }
@ItemClick public final void listView(Object data) { if (data instanceof DiffFile.DiffSingleFile) { DiffFile.DiffSingleFile fileData = (DiffFile.DiffSingleFile) data; MergeFileDetailActivity_ .intent(CommitFileListActivity.this) .mProjectPath(mProjectPath) .mSingleFile(fileData) .start(); } }
@ItemClick public final void listView(DiffFile.DiffSingleFile data) { MergeFileDetailActivity_.intent(this) .mProjectPath(mMerge.getProjectPath()) .mSingleFile(data) .mergeIid(mMerge.getIid()) .mMerge(mMerge) .start(); }
@ItemClick public void listViewItemClicked(int position) { AttachmentsActivity_.intent(getActivity()) .mAttachmentFolderObject(mData.get(position)) .mProjectObjectId(mProjectObject.getId()) .mProject(mProjectObject) .startForResult(RESULT_REQUEST_FILES); }
@ItemClick final void listView(ProjectObject itemData) { itemData.is_public = itemData.getType() == 1 ? true : false; itemData.description = itemData.description.replace("<em>", "").replace("</em>", ""); itemData.name = itemData.name.replace("<em>", "").replace("</em>", ""); itemData.getOwner().global_key = itemData.project_path.substring(0, itemData.project_path.indexOf("/p/")).replace("/u/", ""); ProjectActivity.ProjectJumpParam param = new ProjectActivity.ProjectJumpParam(itemData.getOwner().global_key, itemData.name); ProjectHomeActivity_.intent(this).mJumpParam(param).startForResult(InitProUtils.REQUEST_PRO_UPDATE); }
@ItemClick protected final void listView(ProjectObject projectObject) { if (mPickProject) { Intent intent = new Intent(); intent.putExtra("data", projectObject); FragmentActivity activity = getActivity(); activity.setResult(Activity.RESULT_OK, intent); activity.finish(); } else { ProjectHomeActivity_ .intent(this) .mProjectObject(projectObject) .start(); } }
@ItemClick void listView(final String item) { showDialog("举报", item, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { final String url = Global.HOST_API + "/inform/tweet"; RequestParams params = new RequestParams(); params.put("user", MyApp.sUserObject.global_key); params.put("content", maopaoId); params.put("reason", item); postNetwork(new RequestData(url, params), TAG_INFORM_MAOPAO); } }); }
@ItemClick(R.id.lv) void clickItem(int position){ int index = position - 1; Intent intent = new Intent(this, TxDetailActivity_.class); intent.putExtra("tx", mAdapter.getItem(index)); intent.putExtra("userId", user.getId()); intent.putExtra("isHot", isHot); startActivity(intent); }
@ItemClick(R.id.lv) void clickItem(int position){ AddressActivity_.intent(this) .batchId(mAdapter.getItem(position).addressBatchId) .batchIndex(position) .start(); }
@ItemClick(R.id.list_view) @UiThread public void onItemClick(PriceOption priceOption) { if (CheckDoubleClick.isFastDoubleClick()) { return; } notifySelected(priceOption); }
@ItemClick(R.id.list_view) @UiThread public void onItemClick(PriceOptionRent priceOption) { if (CheckDoubleClick.isFastDoubleClick()) return; notifySelected(priceOption); }
@ItemClick(R.id.list_view) @UiThread public void onItemClick(SpaceAreaOption so) { if( CheckDoubleClick.isFastDoubleClick() ) return; // RentSelcetInfo areaResponse = new RentSelcetInfo(); // areaResponse.setLabel(spaceAreaOption1.getLabel()); // areaResponse.setSpaceArea(spaceAreaOption1.getSpaceArea()) ; // notifySelected(so); }
@ItemClick(R.id.arealist) @UiThread public void onItemClick(final AreaResponse person) { final RegisterSelectTownFragment townFragment = GeneratedClassUtils.getInstance(RegisterSelectTownFragment.class); Bundle argsBundle = new Bundle(); argsBundle.putInt("townId", person.getAreaId()); argsBundle.putString("townNameString", person.getName()); townFragment.setArguments(argsBundle); townFragment.tag = townFragment.getClass().getName(); townFragment.setCustomAnimations(R.anim.anim_fragment_in, R.anim.anim_fragment_out, R.anim.anim_fragment_close_in, R.anim.anim_fragment_close_out); townFragment.setManager(getFragmentManager()); townFragment.setSelectListener(new SelectListener<AreaResponse>() { @Override public void onSelected(AreaResponse t) { AreaAndTownMessage areaAndTownMessage = new AreaAndTownMessage(); areaAndTownMessage.setAreaId(person.getAreaId()); areaAndTownMessage.setAreaName(person.getName()); areaAndTownMessage.setTownId(t.getAreaId()); areaAndTownMessage.setTownName(t.getName()); notifySelected(areaAndTownMessage); } @Override public void onCanceled() { adapter(); } }); townFragment.show(SHOW_ADD_HIDE); }
@ItemClick(R.id.townlist) @UiThread public void onItemClick(AreaResponse person) { AreaResponse areaResponse = new AreaResponse(); areaResponse.setAreaId(person.getAreaId()); areaResponse.setName(person.getName()); notifySelected(areaResponse); }
/** * Choose on bank and back to previous fragment. * @param position */ @ItemClick(R.id.bank_list) void OnItemClickListener(int position){ if (CheckDoubleClick.isFastDoubleClick()) { return ; } if (getSelectListener()!=null) { notifySelected(mBankList.get(position)); } }
@ItemClick(resName="audit_list") void auditListItemClicked(Audit audit) { selectedAuditId = audit.getId(); if (Audit.Status.TERMINATED.equals(audit.getStatus())) { ResultAuditActivity_.intent(this).auditId(audit.getId()).start(); } else { SetupAuditPathActivity_.intent(this).auditId(audit.getId()).start(); } }
@ItemClick(R.id.color_grid) void onColorSwatchClick(final int position) { if (!isReadyForInput) return; EditColorFragment dialog = EditColorFragment.newInstance(adapter.getColor(position)); dialog.show(getFragmentManager(), "editcolor"); dialog.setColorAdjustListener(new EditColorFragment.OnColorAdjustListener() { @Override public void onColorChanged(int color) { boundService.setPixel(position, color); adapter.setColor(position, color); } }); }
@ItemClick(R.id.listview) void onItemClick(SearchResult item) { Intent lVideoIntent; YouTubeInitializationResult result = YouTubeApiServiceUtil.isYouTubeApiServiceAvailable(getActivity()); if (result == YouTubeInitializationResult.SUCCESS) { lVideoIntent = new Intent(getActivity(), PlayVideoUsingYouTuBeActivity_.class); } else { lVideoIntent = new Intent(getActivity(), PlayVideoUsingVideoViewActivity_.class); } lVideoIntent.putExtra("videoId", item.getId().getVideoId()); startActivity(lVideoIntent); }
@ItemClick void listItemClicked(TrackListTrack trackListTrack) { if (trackListTrack.getMbid() == null) { TrackDetailActivity_.intent(getActivity()) .mbid(trackListTrack.getMbid()) .start(); } else { TrackDetailActivity_.intent(getActivity()) .track(trackListTrack.getName()) .artist(trackListTrack.getArtist().getName()) .start(); } }
@Override @ItemClick(android.R.id.list) protected void onListItemClick(int position) { String path = listAdapter.getItem(position); if (isDirectory(path)) { super.onListItemClick(position); return; } String returnPath = null; if (extraExtensions == null) { returnPath = path; } else { for (String ext : extraExtensions) { if (path.endsWith(ext)) { returnPath = path; } } } if (returnPath == null) { return; } Intent intent = getIntent(); intent.putExtra(RESULT_INTENT_PATH, currentFullPath); intent.putExtra(RESULT_INTENT_FILENAME, returnPath); setResult(RESULT_OK, intent); finish(); }
@ItemClick(android.R.id.list) void onClickListItem(int position) { final DownloadsItem item = listAdapter.getItem(position); TextView textView = new TextView(this); textView.setAutoLinkMask(Linkify.WEB_URLS | Linkify.EMAIL_ADDRESSES); textView.setText(String.format( "%s\nsize: %s", item.getDescription(), item.getSize())); ScrollView scrollView = new ScrollView(this); scrollView.addView(textView); new MaterialDialog.Builder(this) .iconRes(R.drawable.ic_file_download_black_36dp) .title(item.getName()) .customView(scrollView, true) .positiveText(R.string.action_download) .callback(new MaterialDialog.ButtonCallback() { @Override public void onPositive(MaterialDialog materialDialog) { resultIntent.putExtra(RESULT_INTENT_ENGLISH, item.isEnglish()); resultIntent.putExtra(RESULT_INTENT_FILENAME, item.getName()); startDownload(item); } }) .negativeText(android.R.string.cancel) .show(); }
@ItemClick(android.R.id.list) void onListItemClick(int position) { Bookmark bookmark = listAdapter.getItem(position); Intent intent = getIntent(); intent.putExtra(EXTRA_URL, bookmark.getUrl()); setResult(RESULT_OK, intent); finish(); }
@ItemClick(android.R.id.list) protected void onListItemClick(int position) { String path = listAdapter.getItem(position); if (path.equals("..")) { goUp(); } else if (path.endsWith("/")) { goIn(path); } }
@ItemClick(R.id.drawer) public void itemClick(int position) { int selectedId = adapter.getItem(position).id; navDrawerItemSelected(selectedId); drawer.setItemChecked(position, true); drawerToggle.changeTitle = false; drawerLayout.closeDrawer(drawer); }
@ItemClick(R.id.drawer_list) protected void onFeedSelected(int position) { if (position == 0) { showRecentItems(); } else { fragmentRemoteRss.updateRemoteItems(feeds.get(position -1).getItems()); } RemoteRssChannel channel = (RemoteRssChannel) drawerList.getAdapter().getItem(position); getSupportActionBar().setSubtitle(channel.getName()); drawerLayout.closeDrawers(); }
@ItemClick(R.id.searchresults_list) protected void onItemClicked(SearchResult item) { if (item.getTorrentUrl() == null) { SnackbarManager.show(Snackbar.with(getActivity()).text(R.string.error_notorrentfile).colorResource(R.color.red)); return; } // Don't broadcast this intent; we can safely assume this is intended for Transdroid only Intent i = TorrentsActivity_.intent(getActivity()).get(); i.setData(Uri.parse(item.getTorrentUrl())); i.putExtra("TORRENT_TITLE", item.getName()); if (resultsSource != null) { i.putExtra("PRIVATE_SOURCE", resultsSource); } startActivity(i); }
@ItemClick(resName = "rssitems_list") protected void onItemClicked(Item item) { if (requiresExternalAuthentication) { // Redirect to the browser, as this feed requires cookie authentication which we piggy-back on using the browser cookies navigationHelper.forceOpenInBrowser(item.getTheLinkUri()); return; } // Don't broadcast this intent; we can safely assume this is intended for Transdroid only Intent i = TorrentsActivity_.intent(getActivity()).get(); i.setData(item.getTheLinkUri()); i.putExtra("TORRENT_TITLE", item.getTitle()); startActivity(i); }
@ItemClick(R.id.listView) protected void itemClicked(Cursor cursor) { Intent intent; if (dashboardType == DashboardType.PHYSICAL) { Host host = hostFacade.mapFromCursor(cursor); intent = hostFacade.getIntentResolver().getDetailIntent(host, getActivity()); } else { Vm vm = vmFacade.mapFromCursor(cursor); intent = vmFacade.getIntentResolver().getDetailIntent(vm, getActivity()); } startActivity(intent); }
@ItemClick(android.R.id.list) protected void itemClicked(Cursor cursor) { final EntityIntentResolver<OVirtEntity> resolver = intentResolvers.getResolver(entityClass); if (resolver != null) { E entity = EntityMapper.forEntity(entityClass).fromCursor(cursor); if (resolver.hasIntent(entity)) { startActivity(resolver.getDetailIntent(entity, getActivity())); } } }
@ItemClick(R.id.lv_textdrawable) public void lv_ItemClick(int position){ showToastMsgShort("点击了TextDrawable列表..."); }
@ItemClick(R.id.listView) void onListItemClicked(int position) { ListEntry item = (ListEntry) listView.getAdapter().getItem(position); startActivity(new Intent(this, item.activityClass)); }
@ItemClick final void listView(UserObject itemData) { UserDetailActivity_.intent(this).globalKey(itemData.global_key).startForResult(RESULT_USER_DETAIL); }
@ItemClick public void listView(ProjectObject item) { ProjectHomeActivity_.intent(this).mProjectObject(item).start(); }
@ItemClick void listViewItemClicked(int pos) { int position = pos - 1; // 由于 addHeader 后, pos 是以 header 开始计算 AttachmentFileObject data = mFilesArray.get(position); if (isEditMode) { if (!data.isFolder) { data.isSelected = !data.isSelected; adapter.notifyDataSetChanged(); } } else { if (data.isFolder) { AttachmentsActivity_.intent(AttachmentsActivity.this) .mAttachmentFolderObject(data.folderObject). mProjectObjectId(mProjectObjectId) .mProject(mProject) .startForResult(ProjectAttachmentFragment.RESULT_REQUEST_FILES); // } else if (data.isImage()) { // AttachmentsPicDetailActivity_.intent(AttachmentsActivity.this).mProjectObjectId(mProjectObjectId).mAttachmentFolderObject(mAttachmentFolderObject).mAttachmentFileObject(data).fileList(getPicFiles()).startForResult(FILE_DELETE_CODE); // } else if (data.isHtml() || data.isMd()) { // AttachmentsHtmlDetailActivity_.intent(AttachmentsActivity.this).mProjectObjectId(mProjectObjectId).mAttachmentFolderObject(mAttachmentFolderObject).mAttachmentFileObject(data).startForResult(FILE_DELETE_CODE); // } else if (data.isTxt()) { // AttachmentsTextDetailActivity_.intent(AttachmentsActivity.this).mProjectObjectId(mProjectObjectId).mAttachmentFolderObject(mAttachmentFolderObject).mAttachmentFileObject(data).startForResult(FILE_DELETE_CODE); } else { if (data.isDownload) { jumpToDetail(data); } else if (data.isImage()) { AttachmentsPhotoDetailActivity_ .intent(this) .mProjectObjectId(mProjectObjectId) .mAttachmentFolderObject(mAttachmentFolderObject) .mAttachmentFileObject(data) .mProject(mProject) .startForResult(FILE_DELETE_CODE); } else { AttachmentsDownloadDetailActivity_.intent(AttachmentsActivity.this) .mProjectObjectId(mProjectObjectId) .mAttachmentFolderObject(mAttachmentFolderObject) .mAttachmentFileObject(data) .mProject(mProject) .startForResult(FILE_DELETE_CODE); } } } }
@ItemClick protected final void listView(Merge merge) { Fragment fragment = getParentFragment(); if (fragment == null) fragment = this; MergeDetailActivity_.intent(fragment).mMerge(merge).startForResult(RESULT_CHANGE); }