/** * 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); } } }
protected OnItemSelectedListener getDefaultItemSelectedListener() { return new OnItemSelectedListener() { @Override public void onItemSelected(Object item, Row row) { // item is selected } }; }
protected OnItemSelectedListener getDefaultItemSelectedListener() { return new OnItemSelectedListener() { @Override public void onItemSelected(Object item, Row row) { if (item instanceof Movie) { mBackgroundURI = ((Movie) item).getBackgroundImageURI(); startBackgroundTimer(); } } }; }
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(); } }; }
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); } }; }
private static void setOnItemSelectedListener(ItemBridgeAdapter.ViewHolder vh, OnItemSelectedListener listener) { ((RowPresenter) vh.getPresenter()).setOnItemSelectedListener(listener); }
public void setOnItemSelectedListener(OnItemSelectedListener listener) { mOnItemSelectedListener = listener; }
/** * Sets an item selection listener. * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)} */ public void setOnItemSelectedListener(OnItemSelectedListener listener) { mOnItemSelectedListener = listener; }
/** * 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; }
/** * Sets an item selection listener. * @deprecated Use {@link #setOnItemViewSelectedListener(OnItemViewSelectedListener)} */ public void setOnItemSelectedListener(OnItemSelectedListener listener) { mExternalOnItemSelectedListener = listener; }
/** * 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; }