// event when double tap occurs @Override public boolean onDoubleTap(MotionEvent e) { if (!mOwnerDisplayName.equals( PreferenceHelper.getInstance(mActivity) .readPreference(mActivity.getString(R.string.API_user_name)))) { Bundle bundle = new Bundle(); bundle.putString("owner_displayname", mOwnerDisplayName); mActivity.perform(6, bundle); return true; } else { UiUtils.showSnackbarToast( mActivity.findViewById(R.id.root_view), "You cannot chat with yourself"); return true; } }
@Override public void onLongPress(MotionEvent e) { if (mActivity.getNetworkStatus()) { // Picasso.with(mActivity).load("http://139.162.1.137/api" + // mFeedList.get(mPosition).getImage()).into(feedViewHolder.mFeedImg); if (!mFeedList .get(mPosition) .getOwner_display_name() .equals( PreferenceHelper.getInstance(mActivity) .readPreference(mActivity.getString(R.string.API_user_name)))) { callHoldApi(mFeedList.get(mPosition).getRid()); } feedViewHolder.mTimeTxt.setVisibility(View.INVISIBLE); feedViewHolder.mFeedImg.getParent().requestDisallowInterceptTouchEvent(true); mFeedFragment.showFullImg(AppConstants.BASE_URL + mFeedList.get(mPosition).getImage()); } else { UiUtils.showSnackbarToast( mActivity.findViewById(R.id.frag_container), "You are not connected to internet"); } super.onLongPress(e); }