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

项目:adt-leanback-support    文件:RowsSupportFragment.java   
/**
 * Sets an item selection listener.
 * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)}
 */
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mOnItemSelectedListener = listener;
    VerticalGridView listView = getVerticalGridView();
    if (listView != null) {
        final int count = listView.getChildCount();
        for (int i = 0; i < count; i++) {
            View view = listView.getChildAt(i);
            ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder)
                    listView.getChildViewHolder(view);
            setOnItemSelectedListener(vh, mOnItemSelectedListener);
        }
    }
}
项目:adt-leanback-support    文件:RowsFragment.java   
/**
 * Sets an item selection listener.
 * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)}
 */
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mOnItemSelectedListener = listener;
    VerticalGridView listView = getVerticalGridView();
    if (listView != null) {
        final int count = listView.getChildCount();
        for (int i = 0; i < count; i++) {
            View view = listView.getChildAt(i);
            ItemBridgeAdapter.ViewHolder vh = (ItemBridgeAdapter.ViewHolder)
                    listView.getChildViewHolder(view);
            setOnItemSelectedListener(vh, mOnItemSelectedListener);
        }
    }
}
项目:BuildingForAndroidTV    文件:TVGridFragment.java   
protected OnItemSelectedListener getDefaultItemSelectedListener() {
    return new OnItemSelectedListener() {
        @Override
        public void onItemSelected(Object item, Row row) {
            // item is selected
        }
    };
}
项目:BuildingForAndroidTV    文件:TVDemoFragment.java   
protected OnItemSelectedListener getDefaultItemSelectedListener() {
    return new OnItemSelectedListener() {
        @Override
        public void onItemSelected(Object item, Row row) {
            if (item instanceof Movie) {
                mBackgroundURI = ((Movie) item).getBackgroundImageURI();
                startBackgroundTimer();
            }
        }
    };
}
项目:BuildingForAndroidTV    文件:CustomHeadersFragment.java   
private OnItemSelectedListener getDefaultItemSelectedListener() {
    return new OnItemSelectedListener() {
        @Override
        public void onItemSelected(Object o, Row row) {
            Object obj = ((ListRow) row).getAdapter().get(0);
            getFragmentManager().beginTransaction().replace(R.id.rows_container, (Fragment) obj).commit();
        }
    };
}
项目:BuildingForAndroidTV    文件:TVGridFragment.java   
protected OnItemSelectedListener getDefaultItemSelectedListener() {
    return new OnItemSelectedListener() {
        @Override
        public void onItemSelected(Object item, Row row) {
            // item is selected
        }
    };
}
项目:BuildingForAndroidTV    文件:TVDemoFragment.java   
protected OnItemSelectedListener getDefaultItemSelectedListener() {
    return new OnItemSelectedListener() {
        @Override
        public void onItemSelected(Object item, Row row) {
            if (item instanceof Movie) {
                mBackgroundURI = ((Movie) item).getBackgroundImageURI();
                startBackgroundTimer();
            }
        }
    };
}
项目:BuildingForAndroidTV    文件:CustomHeadersFragment.java   
private OnItemSelectedListener getDefaultItemSelectedListener() {
    return new OnItemSelectedListener() {
        @Override
        public void onItemSelected(Object o, Row row) {
            Object obj = ((ListRow) row).getAdapter().get(0);
            getFragmentManager().beginTransaction().replace(R.id.rows_container, (Fragment) obj).commit();
            ((TVDemoActivity) getActivity()).updateCurrentRowsFragment((CustomRowsFragment) obj);
        }
    };
}
项目:BuildingForAndroidTV    文件:TVGridFragment.java   
protected OnItemSelectedListener getDefaultItemSelectedListener() {
    return new OnItemSelectedListener() {
        @Override
        public void onItemSelected(Object item, Row row) {
            // item is selected
        }
    };
}
项目:BuildingForAndroidTV    文件:TVDemoFragment.java   
protected OnItemSelectedListener getDefaultItemSelectedListener() {
    return new OnItemSelectedListener() {
        @Override
        public void onItemSelected(Object item, Row row) {
            if (item instanceof Movie) {
                mBackgroundURI = ((Movie) item).getBackgroundImageURI();
                startBackgroundTimer();
            }
        }
    };
}
项目:adt-leanback-support    文件:RowsSupportFragment.java   
private static void setOnItemSelectedListener(ItemBridgeAdapter.ViewHolder vh,
        OnItemSelectedListener listener) {
    ((RowPresenter) vh.getPresenter()).setOnItemSelectedListener(listener);
}
项目:adt-leanback-support    文件:RowsFragment.java   
private static void setOnItemSelectedListener(ItemBridgeAdapter.ViewHolder vh,
        OnItemSelectedListener listener) {
    ((RowPresenter) vh.getPresenter()).setOnItemSelectedListener(listener);
}
项目:adt-leanback-support    文件:HeadersFragment.java   
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mOnItemSelectedListener = listener;
}
项目:adt-leanback-support    文件:HeadersSupportFragment.java   
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mOnItemSelectedListener = listener;
}
项目:adt-leanback-support    文件:VerticalGridSupportFragment.java   
/**
 * Sets an item selection listener.
 * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)}
 */
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mOnItemSelectedListener = listener;
}
项目:adt-leanback-support    文件:SearchSupportFragment.java   
/**
 * Sets an item selection listener for the results.
 *
 * @param listener The item selection listener to be invoked when an item in
 *        the search results is selected.
 * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)}
 */
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mOnItemSelectedListener = listener;
}
项目:adt-leanback-support    文件:DetailsSupportFragment.java   
/**
 * Sets an item selection listener.
 * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)}
 */
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mExternalOnItemSelectedListener = listener;
}
项目:adt-leanback-support    文件:DetailsFragment.java   
/**
 * Sets an item selection listener.
 * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)}
 */
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mExternalOnItemSelectedListener = listener;
}
项目:adt-leanback-support    文件:BrowseFragment.java   
/**
 * Sets an item selection listener. This listener will be called when an
 * item or row is selected by a user.
 *
 * @param listener The listener to call when an item or row is selected.
 * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)}
 */
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mExternalOnItemSelectedListener = listener;
}
项目:adt-leanback-support    文件:SearchFragment.java   
/**
 * Sets an item selection listener for the results.
 *
 * @param listener The item selection listener to be invoked when an item in
 *        the search results is selected.
 * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)}
 */
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mOnItemSelectedListener = listener;
}
项目:adt-leanback-support    文件:BrowseSupportFragment.java   
/**
 * Sets an item selection listener. This listener will be called when an
 * item or row is selected by a user.
 *
 * @param listener The listener to call when an item or row is selected.
 * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)}
 */
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mExternalOnItemSelectedListener = listener;
}
项目:adt-leanback-support    文件:VerticalGridFragment.java   
/**
 * Sets an item selection listener.
 * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)}
 */
public void setOnItemSelectedListener(OnItemSelectedListener listener) {
    mOnItemSelectedListener = listener;
}