I am migrating from a ListView supported by a CursorAdapter, a RecyclerView is supported by shywim.
I'm having trouble getting rid of a cursor object used to go back:
(MyCursor) mListView.getItemAtPosition (i)
How to get access to the cursor in a specific situation inside the recyclableview? Thank you.
Unfortunately this is not part of RecyclerView. To define I define an interface: ViewHolder implements View.OnClickListener, and its creator takes an object that implements my OnItemClickListener interface: When you click on a row, I click the viewer to view and its status is
Public Interface OnItemClickListener {Public Zero onItemClick (see View, Integer Status); }
public static class ViewHolder See Reach RecyclerView.ViewHolder Apply. OnClickListener {Private OnItemClickListener mListener; Public viewer (see item see) {super (item view); ItemView.setOnClickListener (this); } Public viewer (see item, see ITemClickListener listener) {this (itemView); MListener = Listener; } @Override Public Zero onClick (see v) {if (mListener = null!) {MListener.onItemClick (V, getPosition ()); }}
No comments:
Post a Comment