Java 类android.support.v17.leanback.widget.OnItemClickedListener 实例源码

项目:Amphitheatre    文件:SearchFragment.java   
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);
            }
        }
    };
}
项目:TuentiTV    文件:SearchFragment.java   
protected OnItemClickedListener getDefaultItemClickedListener() {
  return new OnItemClickedListener() {
    @Override public void onItemClicked(Object item, Row row) {
      searchPresenter.onContactClicked((Contact) item);
    }
  };
}
项目:adt-leanback-support    文件:VerticalGridSupportFragment.java   
/**
 * Sets an item clicked listener.
 * @deprecated Use {@link #setOnItemViewClickedListener(OnItemViewClickedListener)}
 */
public void setOnItemClickedListener(OnItemClickedListener listener) {
    mOnItemClickedListener = listener;
    if (mGridPresenter != null) {
        mGridPresenter.setOnItemClickedListener(mOnItemClickedListener);
    }
}
项目:adt-leanback-support    文件:RowsSupportFragment.java   
/**
 * 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");
    }
}
项目:adt-leanback-support    文件:DetailsSupportFragment.java   
/**
 * Sets an item Clicked listener.
 * @deprecated Use {@link #setOnItemViewClickedListener(OnItemViewClickedListener)}
 */
public void setOnItemClickedListener(OnItemClickedListener listener) {
    mOnItemClickedListener = listener;
    if (mRowsSupportFragment != null) {
        mRowsSupportFragment.setOnItemClickedListener(listener);
    }
}
项目:adt-leanback-support    文件:DetailsFragment.java   
/**
 * Sets an item Clicked listener.
 * @deprecated Use {@link #setOnItemViewClickedListener(OnItemViewClickedListener)}
 */
public void setOnItemClickedListener(OnItemClickedListener listener) {
    mOnItemClickedListener = listener;
    if (mRowsFragment != null) {
        mRowsFragment.setOnItemClickedListener(listener);
    }
}
项目:adt-leanback-support    文件:RowsFragment.java   
/**
 * 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");
    }
}
项目:adt-leanback-support    文件:VerticalGridFragment.java   
/**
 * Sets an item clicked listener.
 * @deprecated Use {@link #setOnItemViewClickedListener(OnItemViewClickedListener)}
 */
public void setOnItemClickedListener(OnItemClickedListener listener) {
    mOnItemClickedListener = listener;
    if (mGridPresenter != null) {
        mGridPresenter.setOnItemClickedListener(mOnItemClickedListener);
    }
}
项目:Amphitheatre    文件:VideoDetailsFragment.java   
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);
            }
        }
    };
}
项目:BuildingForAndroidTV    文件:TVGridFragment.java   
protected OnItemClickedListener getDefaultItemClickedListener() {
    return new OnItemClickedListener() {
        @Override
        public void onItemClicked(Object item, Row row) {
            Utils.showToast(getActivity(), "Item clicked");
        }
    };
}
项目:BuildingForAndroidTV    文件:TVVideoDetailsFragment.java   
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);
            }
        }
    };
}
项目:BuildingForAndroidTV    文件:TVSearchFragment.java   
private OnItemClickedListener getDefaultItemClickedListener() {
    return new OnItemClickedListener() {
        @Override
        public void onItemClicked(Object o, Row row) {
            Utils.showToast(getActivity(), "Do something");
        }
    };
}
项目:BuildingForAndroidTV    文件:TVGridFragment.java   
protected OnItemClickedListener getDefaultItemClickedListener() {
    return new OnItemClickedListener() {
        @Override
        public void onItemClicked(Object item, Row row) {
            Utils.showToast(getActivity(), "Item clicked");
        }
    };
}
项目:BuildingForAndroidTV    文件:TVVideoDetailsFragment.java   
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);
            }
        }
    };
}
项目:BuildingForAndroidTV    文件:TVSearchFragment.java   
private OnItemClickedListener getDefaultItemClickedListener() {
    return new OnItemClickedListener() {
        @Override
        public void onItemClicked(Object o, Row row) {
            Utils.showToast(getActivity(), "Do something");
        }
    };
}
项目:BuildingForAndroidTV    文件:TVGridFragment.java   
protected OnItemClickedListener getDefaultItemClickedListener() {
    return new OnItemClickedListener() {
        @Override
        public void onItemClicked(Object item, Row row) {
            Utils.showToast(getActivity(), "Item clicked");
        }
    };
}
项目:BuildingForAndroidTV    文件:TVVideoDetailsFragment.java   
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);
            }
        }
    };
}
项目:BuildingForAndroidTV    文件:TVSearchFragment.java   
private OnItemClickedListener getDefaultItemClickedListener() {
    return new OnItemClickedListener() {
        @Override
        public void onItemClicked(Object o, Row row) {
            Utils.showToast(getActivity(), "Do something");
        }
    };
}
项目:adt-leanback-support    文件:BrowseFragment.java   
/**
 * 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);
    }
}
项目:adt-leanback-support    文件:BrowseSupportFragment.java   
/**
 * 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);
    }
}
项目:adt-leanback-support    文件:VerticalGridSupportFragment.java   
/**
 * Returns the item clicked listener.
 * @deprecated Use {@link #getOnItemViewClickedListener()}
 */
public OnItemClickedListener getOnItemClickedListener() {
    return mOnItemClickedListener;
}
项目:adt-leanback-support    文件:SearchSupportFragment.java   
/**
 * 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;
}
项目:adt-leanback-support    文件:RowsSupportFragment.java   
/**
 * Returns the item clicked listener.
 * @deprecated Use {@link #getOnItemClickedListener()}
 */
public OnItemClickedListener getOnItemClickedListener() {
    return mOnItemClickedListener;
}
项目:adt-leanback-support    文件:DetailsSupportFragment.java   
/**
 * Returns the item Clicked listener.
 * @deprecated Use {@link #getOnItemViewClickedListener()}
 */
public OnItemClickedListener getOnItemClickedListener() {
    return mOnItemClickedListener;
}
项目:adt-leanback-support    文件:DetailsFragment.java   
/**
 * Returns the item Clicked listener.
 * @deprecated Use {@link #getOnItemViewClickedListener()}
 */
public OnItemClickedListener getOnItemClickedListener() {
    return mOnItemClickedListener;
}
项目:adt-leanback-support    文件:RowsFragment.java   
/**
 * Returns the item clicked listener.
 * @deprecated Use {@link #getOnItemClickedListener()}
 */
public OnItemClickedListener getOnItemClickedListener() {
    return mOnItemClickedListener;
}
项目:adt-leanback-support    文件:BrowseFragment.java   
/**
 * Returns the item clicked listener.
 * @deprecated Use {@link #getOnItemViewClickedListener()}
 */
public OnItemClickedListener getOnItemClickedListener() {
    return mOnItemClickedListener;
}
项目:adt-leanback-support    文件:SearchFragment.java   
/**
 * 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;
}
项目:adt-leanback-support    文件:BrowseSupportFragment.java   
/**
 * Returns the item clicked listener.
 * @deprecated Use {@link #getOnItemViewClickedListener()}
 */
public OnItemClickedListener getOnItemClickedListener() {
    return mOnItemClickedListener;
}
项目:adt-leanback-support    文件:VerticalGridFragment.java   
/**
 * Returns the item clicked listener.
 * @deprecated Use {@link #getOnItemViewClickedListener()}
 */
public OnItemClickedListener getOnItemClickedListener() {
    return mOnItemClickedListener;
}