{"action":"created","issue":{"url":"https://api.github.com/repos/woxblom/DragListView/issues/96","repository_url":"https://api.github.com/repos/woxblom/DragListView","labels_url":"https://api.github.com/repos/woxblom/DragListView/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/woxblom/DragListView/issues/96/comments","events_url":"https://api.github.com/repos/woxblom/DragListView/issues/96/events","html_url":"https://github.com/woxblom/DragListView/issues/96","id":277514164,"number":96,"title":"Drag on whole item but still listen to click","user":{"login":"morhenny","id":32928880,"avatar_url":"https://avatars2.githubusercontent.com/u/32928880?v=4","gravatar_id":"","url":"https://api.github.com/users/morhenny","html_url":"https://github.com/morhenny","followers_url":"https://api.github.com/users/morhenny/followers","following_url":"https://api.github.com/users/morhenny/following{/other_user}","gists_url":"https://api.github.com/users/morhenny/gists{/gist_id}","starred_url":"https://api.github.com/users/morhenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morhenny/subscriptions","organizations_url":"https://api.github.com/users/morhenny/orgs","repos_url":"https://api.github.com/users/morhenny/repos","events_url":"https://api.github.com/users/morhenny/events{/privacy}","received_events_url":"https://api.github.com/users/morhenny/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-28T19:44:51Z","updated_at":"2017-11-29T22:03:09Z","closed_at":null,"author_association":"NONE","body":"I set the grabHandleId to the whole item layout (not just an image) like suggested in #63 but now the onItemClicked method of the viewHolder is no longer executed.\r\n\r\nIs there something I'm missing or is that just not possible?"},"comment":{"url":"https://api.github.com/repos/woxblom/DragListView/issues/comments/348011737","html_url":"https://github.com/woxblom/DragListView/issues/96#issuecomment-348011737","issue_url":"https://api.github.com/repos/woxblom/DragListView/issues/96","id":348011737,"user":{"login":"morhenny","id":32928880,"avatar_url":"https://avatars2.githubusercontent.com/u/32928880?v=4","gravatar_id":"","url":"https://api.github.com/users/morhenny","html_url":"https://github.com/morhenny","followers_url":"https://api.github.com/users/morhenny/followers","following_url":"https://api.github.com/users/morhenny/following{/other_user}","gists_url":"https://api.github.com/users/morhenny/gists{/gist_id}","starred_url":"https://api.github.com/users/morhenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morhenny/subscriptions","organizations_url":"https://api.github.com/users/morhenny/orgs","repos_url":"https://api.github.com/users/morhenny/repos","events_url":"https://api.github.com/users/morhenny/events{/privacy}","received_events_url":"https://api.github.com/users/morhenny/received_events","type":"User","site_admin":false},"created_at":"2017-11-29T22:03:09Z","updated_at":"2017-11-29T22:03:09Z","author_association":"NONE","body":"\r\n`public class ItemAdapter extends DragItemAdapter<Clue, ItemAdapter.ViewHolder> {\r\n\r\n    private int mLayoutId;\r\n    private int mGrabHandleId;\r\n    private boolean mDragOnLongPress;\r\n    private RecyclerViewClickListener itemListener;\r\n\r\n    ItemAdapter(ArrayList<Clue> list, int layoutId, int grabHandleId, boolean dragOnLongPress, RecyclerViewClickListener itemListener) {\r\n        mLayoutId = layoutId;\r\n        mGrabHandleId = grabHandleId;\r\n        mDragOnLongPress = dragOnLongPress;\r\n        this.itemListener = itemListener;\r\n        setItemList(list);\r\n    }\r\n    @Override\r\n    public long getUniqueItemId(int position) {\r\n        return getItemList().get(position).hashCode();\r\n    }\r\n\r\n    @Override\r\n    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\r\n        View view = LayoutInflater.from(parent.getContext()).inflate(mLayoutId, parent, false);\r\n        return new ViewHolder(view);\r\n    }\r\n\r\n    @Override\r\n    public void onBindViewHolder(ViewHolder holder, int position) {\r\n        super.onBindViewHolder(holder, position);\r\n        String name = mItemList.get(position).getLoc().getId();\r\n        String clue = mItemList.get(position).getClueText();\r\n        holder.name.setText(name);\r\n        holder.clueText.setText(clue);\r\n        holder.itemView.setTag(mItemList.get(position));\r\n    }\r\n\r\n    class ViewHolder extends DragItemAdapter.ViewHolder {\r\n        TextView name;\r\n        TextView clueText;\r\n\r\n        ViewHolder(final View itemView) {\r\n            super(itemView, mGrabHandleId, mDragOnLongPress);\r\n            name = (TextView) itemView.findViewById(R.id.clue_list_item_name);\r\n            clueText = (TextView) itemView.findViewById(R.id.clue_list_item_cluetext);\r\n        }\r\n\r\n\r\n        @Override\r\n        public void onItemClicked(View view) {\r\n            itemListener.recyclerViewListClicked(view, this.getLayoutPosition());\r\n        }\r\n\r\n        @Override\r\n        public boolean onItemLongClicked(View view) {\r\n            Toast.makeText(view.getContext(), \"Item long clicked\", Toast.LENGTH_SHORT).show();\r\n            return true;\r\n        }\r\n    }\r\n}`"}}
{"actor":{"display_login":"morhenny"}}