{"action":"opened","issue":{"url":"https://api.github.com/repos/airbnb/epoxy/issues/87","repository_url":"https://api.github.com/repos/airbnb/epoxy","labels_url":"https://api.github.com/repos/airbnb/epoxy/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/epoxy/issues/87/comments","events_url":"https://api.github.com/repos/airbnb/epoxy/issues/87/events","html_url":"https://github.com/airbnb/epoxy/issues/87","id":196238667,"number":87,"title":"Unable to check RecyclerView.NO_POSITION","user":{"login":"shakil807g","id":13196689,"avatar_url":"https://avatars.githubusercontent.com/u/13196689?v=3","gravatar_id":"","url":"https://api.github.com/users/shakil807g","html_url":"https://github.com/shakil807g","followers_url":"https://api.github.com/users/shakil807g/followers","following_url":"https://api.github.com/users/shakil807g/following{/other_user}","gists_url":"https://api.github.com/users/shakil807g/gists{/gist_id}","starred_url":"https://api.github.com/users/shakil807g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakil807g/subscriptions","organizations_url":"https://api.github.com/users/shakil807g/orgs","repos_url":"https://api.github.com/users/shakil807g/repos","events_url":"https://api.github.com/users/shakil807g/events{/privacy}","received_events_url":"https://api.github.com/users/shakil807g/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-17T19:34:32Z","updated_at":"2016-12-17T19:34:32Z","closed_at":null,"body":"As per RecyclerView Animations and Behind the Scenes (Android Dev Summit 2015)\r\nhttps://youtu.be/imsr8NrIAMs?t=36m2s you should check the ViewHolder's position before triggering an onItemClick that was pass in Model   and how to properly handle item click  is this correct way ??\r\n\r\n    public class ButtonModel extends EpoxyModelWithHolder<ButtonModel.ButtonHolder> {\r\n\r\n    @EpoxyAttribute\r\n    String text;\r\n    @EpoxyAttribute(hash = false)\r\n    ItemClickListener itemClickListener;\r\n\r\n\r\n\r\n    @Override\r\n    protected int getDefaultLayout() {\r\n        return R.layout.model_button;\r\n    }\r\n\r\n\r\n    @Override\r\n    public void bind(final ButtonHolder holder) {\r\n        super.bind(holder);\r\n\r\n        holder.container.setBackgroundResource(R.color.pink_200);\r\n        holder.container.setOnClickListener(new View.OnClickListener() {\r\n            @Override\r\n            public void onClick(View v) {\r\n                itemClickListener.itemClick(holder.container, text);\r\n            }\r\n        });\r\n        holder.text.setText(text);\r\n\r\n\r\n    }\r\n\r\n\r\n    @Override\r\n    public int getSpanSize(int totalSpanCount, int position, int itemCount) {\r\n        return 1;\r\n    }\r\n\r\n    @Override\r\n    protected ButtonHolder createNewHolder() {\r\n        return new ButtonHolder();\r\n    }\r\n\r\n\r\n    static class ButtonHolder extends BaseEpoxyHolder {\r\n\r\n        @BindView(R.id.text)\r\n        TextView text;\r\n        @BindView(R.id.container)\r\n        FrameLayout container;\r\n    }\r\n\r\n      public interface ItemClickListener {\r\n          void itemClick(View parent, String text);\r\n       }\r\n      }"}}
{"actor":{"display_login":"shakil807g"}}