{"action":"created","issue":{"url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/1345","repository_url":"https://api.github.com/repos/mikepenz/MaterialDrawer","labels_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/1345/labels{/name}","comments_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/1345/comments","events_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/1345/events","html_url":"https://github.com/mikepenz/MaterialDrawer/issues/1345","id":161043709,"number":1345,"title":"OnDrawerItemClickListener not always called (CrossfadeDrawerLayout)","user":{"login":"codeAbode","id":7216340,"avatar_url":"https://avatars.githubusercontent.com/u/7216340?v=3","gravatar_id":"","url":"https://api.github.com/users/codeAbode","html_url":"https://github.com/codeAbode","followers_url":"https://api.github.com/users/codeAbode/followers","following_url":"https://api.github.com/users/codeAbode/following{/other_user}","gists_url":"https://api.github.com/users/codeAbode/gists{/gist_id}","starred_url":"https://api.github.com/users/codeAbode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeAbode/subscriptions","organizations_url":"https://api.github.com/users/codeAbode/orgs","repos_url":"https://api.github.com/users/codeAbode/repos","events_url":"https://api.github.com/users/codeAbode/events{/privacy}","received_events_url":"https://api.github.com/users/codeAbode/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mikepenz/MaterialDrawer/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mikepenz/MaterialDrawer/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":{"login":"mikepenz","id":1476232,"avatar_url":"https://avatars.githubusercontent.com/u/1476232?v=3","gravatar_id":"","url":"https://api.github.com/users/mikepenz","html_url":"https://github.com/mikepenz","followers_url":"https://api.github.com/users/mikepenz/followers","following_url":"https://api.github.com/users/mikepenz/following{/other_user}","gists_url":"https://api.github.com/users/mikepenz/gists{/gist_id}","starred_url":"https://api.github.com/users/mikepenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikepenz/subscriptions","organizations_url":"https://api.github.com/users/mikepenz/orgs","repos_url":"https://api.github.com/users/mikepenz/repos","events_url":"https://api.github.com/users/mikepenz/events{/privacy}","received_events_url":"https://api.github.com/users/mikepenz/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2016-06-18T21:13:51Z","updated_at":"2016-06-19T19:34:06Z","closed_at":null,"body":"Sometimes when I press on a drawer item, the listener is not called and the item needs to be pressed again. Below is my drawer click listener:\r\n\r\n```java\r\n.withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {\r\n                    @Override\r\n                    public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {\r\n                        Log.d(TAG, \"onItemClick: \"+position);\r\n                            switch(position){\r\n                                case 1:\r\n                                    if(context.getClass() !=  MainActivity.class){\r\n                                        Intent s = new Intent(context, MainActivity.class);\r\n                                        context.startActivity(s);\r\n                                    }\r\n                                    break;\r\n```\r\n\r\nAnd this is a snippet of my drawer builder:\r\n\r\n```java\r\n final Drawer drawer = new DrawerBuilder()\r\n                .withActivity((Activity) context)\r\n                .withHasStableIds(true)\r\n                .withToolbar(toolbar)\r\n                .withDrawerLayout(R.layout.crossfade_drawer)\r\n                .withSliderBackgroundColor(ContextCompat.getColor(context, R.color.darkgrey))\r\n                .withDrawerWidthDp(72)\r\n                .withDelayDrawerClickEvent(-1)\r\n                .withAccountHeader(headerResult) //set the AccountHeader we created earlier for the header\r\n                .withCloseOnClick(true)\r\n                .addDrawerItems(\r\n                        new PrimaryDrawerItem()\r\n                                .withName(R.string.home_drawer_title)\r\n                                .withSelectedColor(ContextCompat.getColor(context, com.mikepenz.materialdrawer.R.color.material_drawer_dark_selected))\r\n                                .withTextColor(ContextCompat.getColor(context, com.mikepenz.materialdrawer.R.color.material_drawer_dark_primary_text))\r\n                                .withSelectedTextColor(ContextCompat.getColor(context, com.mikepenz.materialdrawer.R.color.material_drawer_dark_selected_text))\r\n                                .withIcon(GoogleMaterial.Icon.gmd_home).withIconColor(ContextCompat.getColor(context, R.color.grey))\r\n                                .withIconColor(ContextCompat.getColor(context, com.mikepenz.materialdrawer.R.color.material_drawer_dark_primary_icon))\r\n                                .withSelectedIconColor(ContextCompat.getColor(context, R.color.colorPrimary))\r\n```"},"comment":{"url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/comments/227015874","html_url":"https://github.com/mikepenz/MaterialDrawer/issues/1345#issuecomment-227015874","issue_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/1345","id":227015874,"user":{"login":"codeAbode","id":7216340,"avatar_url":"https://avatars.githubusercontent.com/u/7216340?v=3","gravatar_id":"","url":"https://api.github.com/users/codeAbode","html_url":"https://github.com/codeAbode","followers_url":"https://api.github.com/users/codeAbode/followers","following_url":"https://api.github.com/users/codeAbode/following{/other_user}","gists_url":"https://api.github.com/users/codeAbode/gists{/gist_id}","starred_url":"https://api.github.com/users/codeAbode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeAbode/subscriptions","organizations_url":"https://api.github.com/users/codeAbode/orgs","repos_url":"https://api.github.com/users/codeAbode/repos","events_url":"https://api.github.com/users/codeAbode/events{/privacy}","received_events_url":"https://api.github.com/users/codeAbode/received_events","type":"User","site_admin":false},"created_at":"2016-06-19T19:34:06Z","updated_at":"2016-06-19T19:34:06Z","body":"I'll dive into your code and trying playing with it over the next week"}}
{"actor":{"display_login":"codeAbode"}}