private OnItemClickedListener getDefaultItemClickedListener() { return new OnItemClickedListener() { @Override public void onItemClicked(Object item, Row row) { if (item instanceof Video) { Video video = (Video) item; if (!video.isMatched()) { VideoUtils.playVideo(new WeakReference<Activity>(getActivity()), (Video) item); return; } Intent intent = new Intent(getActivity(), DetailsActivity.class); intent.putExtra(Constants.VIDEO, video); startActivity(intent); } } }; }
protected OnItemClickedListener getDefaultItemClickedListener() { return new OnItemClickedListener() { @Override public void onItemClicked(Object item, Row row) { searchPresenter.onContactClicked((Contact) item); } }; }
/** * Sets an item clicked listener. * @deprecated Use {@link #setOnItemViewClickedListener(OnItemViewClickedListener)} */ public void setOnItemClickedListener(OnItemClickedListener listener) { mOnItemClickedListener = listener; if (mGridPresenter != null) { mGridPresenter.setOnItemClickedListener(mOnItemClickedListener); } }
/** * Sets an item clicked listener on the fragment. * OnItemClickedListener will override {@link View.OnClickListener} that * item presenter sets during {@link Presenter#onCreateViewHolder(ViewGroup)}. * So in general, developer should choose one of the listeners but not both. * @deprecated Use {@link #setOnItemViewClickedListener(OnItemViewClickedListener)} */ public void setOnItemClickedListener(OnItemClickedListener listener) { mOnItemClickedListener = listener; if (mViewsCreated) { throw new IllegalStateException( "Item clicked listener must be set before views are created"); } }
/** * Sets an item Clicked listener. * @deprecated Use {@link #setOnItemViewClickedListener(OnItemViewClickedListener)} */ public void setOnItemClickedListener(OnItemClickedListener listener) { mOnItemClickedListener = listener; if (mRowsSupportFragment != null) { mRowsSupportFragment.setOnItemClickedListener(listener); } }
/** * Sets an item Clicked listener. * @deprecated Use {@link #setOnItemViewClickedListener(OnItemViewClickedListener)} */ public void setOnItemClickedListener(OnItemClickedListener listener) { mOnItemClickedListener = listener; if (mRowsFragment != null) { mRowsFragment.setOnItemClickedListener(listener); } }
protected OnItemClickedListener getDefaultItemClickedListener() { return new OnItemClickedListener() { @Override public void onItemClicked(Object item, Row row) { if (item instanceof Video) { Intent intent = new Intent(getActivity(), DetailsActivity.class); intent.putExtra(Constants.IS_VIDEO, true); intent.putExtra(Constants.VIDEO, (Video) item); startActivity(intent); } } }; }
protected OnItemClickedListener getDefaultItemClickedListener() { return new OnItemClickedListener() { @Override public void onItemClicked(Object item, Row row) { Utils.showToast(getActivity(), "Item clicked"); } }; }
protected OnItemClickedListener getDefaultItemClickedListener() { return new OnItemClickedListener() { @Override public void onItemClicked(Object item, Row row) { if (item instanceof Movie) { Movie movie = (Movie) item; Intent intent = new Intent(getActivity(), TVDetailsActivity.class); intent.putExtra(MOVIE, movie); startActivity(intent); } } }; }
private OnItemClickedListener getDefaultItemClickedListener() { return new OnItemClickedListener() { @Override public void onItemClicked(Object o, Row row) { Utils.showToast(getActivity(), "Do something"); } }; }
/** * Sets an item clicked listener on the fragment. * * <p>OnItemClickedListener will override {@link View.OnClickListener} that * an item presenter may set during * {@link Presenter#onCreateViewHolder(ViewGroup)}. So in general, you * should choose to use an {@link OnItemClickedListener} or a * {@link View.OnClickListener} on your item views, but not both. * * @param listener The listener to call when an item is clicked. * @deprecated Use {@link #setOnItemViewClickedListener(OnItemViewClickedListener)} */ public void setOnItemClickedListener(OnItemClickedListener listener) { mOnItemClickedListener = listener; if (mRowsFragment != null) { mRowsFragment.setOnItemClickedListener(listener); } }
/** * Sets an item clicked listener on the fragment. * * <p>OnItemClickedListener will override {@link View.OnClickListener} that * an item presenter may set during * {@link Presenter#onCreateViewHolder(ViewGroup)}. So in general, you * should choose to use an {@link OnItemClickedListener} or a * {@link View.OnClickListener} on your item views, but not both. * * @param listener The listener to call when an item is clicked. * @deprecated Use {@link #setOnItemViewClickedListener(OnItemViewClickedListener)} */ public void setOnItemClickedListener(OnItemClickedListener listener) { mOnItemClickedListener = listener; if (mRowsSupportFragment != null) { mRowsSupportFragment.setOnItemClickedListener(listener); } }
/** * Returns the item clicked listener. * @deprecated Use {@link #getOnItemViewClickedListener()} */ public OnItemClickedListener getOnItemClickedListener() { return mOnItemClickedListener; }
/** * Sets an item clicked listener for the results. * * @param listener The item clicked listener to be invoked when an item in * the search results is clicked. * @deprecated Use {@link #setOnItemViewClickedListener(OnItemViewClickedListener)} */ public void setOnItemClickedListener(OnItemClickedListener listener) { mOnItemClickedListener = listener; }
/** * Returns the item clicked listener. * @deprecated Use {@link #getOnItemClickedListener()} */ public OnItemClickedListener getOnItemClickedListener() { return mOnItemClickedListener; }
/** * Returns the item Clicked listener. * @deprecated Use {@link #getOnItemViewClickedListener()} */ public OnItemClickedListener getOnItemClickedListener() { return mOnItemClickedListener; }