@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Object item = parent.getAdapter().getItem(position); if (item instanceof ThrowPhoto) { ThrowPhoto throwPhoto = (ThrowPhoto) item; Bundle arguments = new Bundle(); arguments.putParcelable(ThrowPhotoShowFragment.EXTRA_THROW_PHOTO, throwPhoto); UILauncher.launchFragmentInNewActivity( mContext, ThrowPhotoShowFragment.class, arguments); } }
@Override public void onClick(View v) { switch (v.getId()) { case R.id.btn_send_message: UILauncher.launchChattingUI(getActivity(), mContact.getUserId()); finish(); break; default: break; } }
@Override public boolean onContextItemSelected(MenuItem item) { boolean handled = true; Activity activity = getActivity(); switch (item.getItemId()) { case R.id.menu_show_avatar: UILauncher.launchShowFriendAvatarImage(activity, mSettingHelper.getAccountAvatar()); break; case R.id.menu_upload_avatar: UILauncher.launchUploadAvatarUIAndSave(this, REQUEST_CODE_UPLOAD_AVATAR); break; case R.id.preview_all_info: UILauncher.launchMyInfoUI(activity); break; default: handled = false; break; } return handled || super.onContextItemSelected(item); }
private void onRecommendLabel() { String[] filterLabelIds = null; if (mLabelIdMap != null) { Set<String> set = mLabelIdMap.keySet(); filterLabelIds = set.toArray(new String[set.size()]); } UILauncher.launchSelectSystemLabelUI( ContactDetailFragment.this, REQUEST_SELECT_SYSTEM_LABEL, filterLabelIds, getString(R.string.select_label), getString(R.string.select), 1); }
@Override public void onLabelLongClick(UserLabel label) { if (!(mMyLabelIdList.contains(label.getId()))) { UILauncher.launchLabelOptionUI(getFragmentManager(), label.toBaseLabel()); } }
private void launchLoginPromptUI() { UILauncher.launchLoginPromptUI(getFragmentManager()); }