{"action":"created","issue":{"url":"https://api.github.com/repos/mikepenz/CrossfadeDrawerLayout/issues/15","repository_url":"https://api.github.com/repos/mikepenz/CrossfadeDrawerLayout","labels_url":"https://api.github.com/repos/mikepenz/CrossfadeDrawerLayout/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/mikepenz/CrossfadeDrawerLayout/issues/15/comments","events_url":"https://api.github.com/repos/mikepenz/CrossfadeDrawerLayout/issues/15/events","html_url":"https://github.com/mikepenz/CrossfadeDrawerLayout/issues/15","id":163328635,"number":15,"title":"OnDrawerItemClickListener not always called (CrossfadeDrawerLayout)","user":{"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},"labels":[{"url":"https://api.github.com/repos/mikepenz/CrossfadeDrawerLayout/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mikepenz/CrossfadeDrawerLayout/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},"assignees":[{"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":7,"created_at":"2016-07-01T06:34:19Z","updated_at":"2016-07-01T06:34:22Z","closed_at":null,"body":"_From @codeAbode on June 18, 2016 21:13_\n\nSometimes 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```\n\n_Copied from original issue: mikepenz/MaterialDrawer#1345_"},"comment":{"url":"https://api.github.com/repos/mikepenz/CrossfadeDrawerLayout/issues/comments/229865807","html_url":"https://github.com/mikepenz/CrossfadeDrawerLayout/issues/15#issuecomment-229865807","issue_url":"https://api.github.com/repos/mikepenz/CrossfadeDrawerLayout/issues/15","id":229865807,"user":{"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},"created_at":"2016-07-01T06:34:22Z","updated_at":"2016-07-01T06:34:22Z","body":"@codeAbode seems like your assumption with the `CrossfadeDrawerLayout` is right. Weird enough is that I have not modified the original `closeDrawers` function and just call this one, after the item was clicked. Which should theoretically do the same as the drawer does internally. \r\n\r\nOne thing could be really true, that you may slide a bit so it is not detected as click. But it is really hard to reproduce this one. \r\n\r\nIts a lot easier to reproduce the `ActionBarDrawerToggle` not fireing issue, just select an item in the normal drawer, and it won't work. but it works if the mini drawer is clicked. "}}
{"actor":{"display_login":"mikepenz"}}