Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

How to extend the Adapter? For example, set RecyclerView.Adapter.getItemId() #17

Open
xiaolongyuan opened this issue Dec 31, 2015 · 0 comments

Comments

@xiaolongyuan
Copy link

RecyclerView.Adapter.getItemId()

        /**
         * Return the stable ID for the item at <code>position</code>. If {@link #hasStableIds()}
         * would return false this method should return {@link #NO_ID}. The default implementation
         * of this method returns {@link #NO_ID}.
         *
         * @param position Adapter position to query
         * @return the stable ID of the item at position
         */
        public long getItemId(int position) {
            return NO_ID;
        }

RecyclerMultiAdapter.getItemId is not extensible

 @Override
    public long getItemId(int position) {
        return position;
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant