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

项目:adt-leanback-support    文件:RowsSupportFragment.java   
private void setupSharedViewPool(ItemBridgeAdapter.ViewHolder bridgeVh) {
    RowPresenter rowPresenter = (RowPresenter) bridgeVh.getPresenter();
    RowPresenter.ViewHolder rowVh = rowPresenter.getRowViewHolder(bridgeVh.getViewHolder());

    if (rowVh instanceof ListRowPresenter.ViewHolder) {
        HorizontalGridView view = ((ListRowPresenter.ViewHolder) rowVh).getGridView();
        // Recycled view pool is shared between all list rows
        if (mRecycledViewPool == null) {
            mRecycledViewPool = view.getRecycledViewPool();
        } else {
            view.setRecycledViewPool(mRecycledViewPool);
        }

        ItemBridgeAdapter bridgeAdapter =
                ((ListRowPresenter.ViewHolder) rowVh).getBridgeAdapter();
        if (mPresenterMapper == null) {
            mPresenterMapper = bridgeAdapter.getPresenterMapper();
        } else {
            bridgeAdapter.setPresenterMapper(mPresenterMapper);
        }
    }
}
项目:adt-leanback-support    文件:RowsFragment.java   
private void setupSharedViewPool(ItemBridgeAdapter.ViewHolder bridgeVh) {
    RowPresenter rowPresenter = (RowPresenter) bridgeVh.getPresenter();
    RowPresenter.ViewHolder rowVh = rowPresenter.getRowViewHolder(bridgeVh.getViewHolder());

    if (rowVh instanceof ListRowPresenter.ViewHolder) {
        HorizontalGridView view = ((ListRowPresenter.ViewHolder) rowVh).getGridView();
        // Recycled view pool is shared between all list rows
        if (mRecycledViewPool == null) {
            mRecycledViewPool = view.getRecycledViewPool();
        } else {
            view.setRecycledViewPool(mRecycledViewPool);
        }

        ItemBridgeAdapter bridgeAdapter =
                ((ListRowPresenter.ViewHolder) rowVh).getBridgeAdapter();
        if (mPresenterMapper == null) {
            mPresenterMapper = bridgeAdapter.getPresenterMapper();
        } else {
            bridgeAdapter.setPresenterMapper(mPresenterMapper);
        }
    }
}
项目:adt-leanback-support    文件:BrowseFragment.java   
private boolean isVerticalScrolling() {
    // don't run transition
    return mHeadersFragment.getVerticalGridView().getScrollState()
            != HorizontalGridView.SCROLL_STATE_IDLE
            || mRowsFragment.getVerticalGridView().getScrollState()
            != HorizontalGridView.SCROLL_STATE_IDLE;
}
项目:adt-leanback-support    文件:BrowseSupportFragment.java   
private boolean isVerticalScrolling() {
    // don't run transition
    return mHeadersSupportFragment.getVerticalGridView().getScrollState()
            != HorizontalGridView.SCROLL_STATE_IDLE
            || mRowsSupportFragment.getVerticalGridView().getScrollState()
            != HorizontalGridView.SCROLL_STATE_IDLE;
}
项目:BuildingForAndroidTV    文件:TVDemoActivity.java   
private boolean isVerticalScrolling() {
    try {
        // don't run transition
        return getVerticalGridView(headersFragment).getScrollState()
                != HorizontalGridView.SCROLL_STATE_IDLE
                || getVerticalGridView(rowsFragment).getScrollState()
                != HorizontalGridView.SCROLL_STATE_IDLE;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
项目:BuildingForAndroidTV    文件:MainActivity.java   
private boolean isVerticalScrolling() {
    try {
        // don't run transition
        return getVerticalGridView(headersFragment).getScrollState()
                != HorizontalGridView.SCROLL_STATE_IDLE
                || getVerticalGridView(rowsFragment).getScrollState()
                != HorizontalGridView.SCROLL_STATE_IDLE;
    } catch (Exception e) {
        e.printStackTrace();
    }

    return false;
}
项目:android_packages_apps_tv    文件:ItemListRowView.java   
@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    mListView = (HorizontalGridView) getContentsView();
}
项目:leanback-showcase    文件:LiveDataRowPresenter.java   
public LiveDataRowPresenterViewHolder(View rootView, HorizontalGridView gridView, ListRowPresenter p) {
    super(rootView, gridView, p);
}