{"action":"created","issue":{"url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/1695","repository_url":"https://api.github.com/repos/mikepenz/MaterialDrawer","labels_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/1695/labels{/name}","comments_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/1695/comments","events_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/1695/events","html_url":"https://github.com/mikepenz/MaterialDrawer/issues/1695","id":200222157,"number":1695,"title":"Issues upgrading from 3.1.2 to 5.8.1","user":{"login":"snijsure","id":1580689,"avatar_url":"https://avatars.githubusercontent.com/u/1580689?v=3","gravatar_id":"","url":"https://api.github.com/users/snijsure","html_url":"https://github.com/snijsure","followers_url":"https://api.github.com/users/snijsure/followers","following_url":"https://api.github.com/users/snijsure/following{/other_user}","gists_url":"https://api.github.com/users/snijsure/gists{/gist_id}","starred_url":"https://api.github.com/users/snijsure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snijsure/subscriptions","organizations_url":"https://api.github.com/users/snijsure/orgs","repos_url":"https://api.github.com/users/snijsure/repos","events_url":"https://api.github.com/users/snijsure/events{/privacy}","received_events_url":"https://api.github.com/users/snijsure/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-11T22:08:12Z","updated_at":"2017-01-11T22:20:21Z","closed_at":null,"body":"I am upgrading my project from 3.1.2 to 5.8.1 and I think I have followed instructions on upgrading correctly however I am getting following crash: Note I am using latest support library 2.5.1 and compileSDKVersion is set to 25\r\n\r\nMy changes to upgrade from 3.1.2 to 5.8.1 are as follows:\r\n\r\nchange app/build.gradle \r\nRemoved:\r\n    compile 'com.mikepenz:materialdrawer:3.1.2'\r\n\r\nAdded:\r\n```\r\n compile('com.mikepenz:fastadapter:2.1.5@aar') {\r\n    transitive = true\r\n  }\r\n  compile('com.mikepenz:materialdrawer:5.8.1@aar') {\r\n   transitive = true\r\n}\r\n```\r\n\r\nChange signature of onItemClick from:\r\n```\r\npublic boolean onItemClick(AdapterView<?> adapterView, View view, int position, long id,              IDrawerItem iDrawerItem) \r\n```\r\nTo new signature          \r\n```\r\npublic boolean onItemClick(View view, int position, IDrawerItem drawerItem) \r\n```\r\nActual code where I use MatrialDrawer library is actually very simple couple of PrimaryDrawerItem.\r\n\r\nWhy would I be getting this crash, note I am not using FastAdapter anywhere else. Do I need to update by proguard files, but I am also getting same crash when proguard is disabled.\r\n```\r\n FATAL EXCEPTION: main\r\n                                                                       PID: 5139\r\n                                                                       java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setTextColor(android.content.res.ColorStateList)' on a null object reference\r\n                                                                           at com.mikepenz.materialdrawer.model.BaseDescribeableDrawerItem.bindViewHelper(BaseDescribeableDrawerItem.java:85)\r\n                                                                           at com.mikepenz.materialdrawer.model.AbstractBadgeableDrawerItem.bindView(AbstractBadgeableDrawerItem.java:73)\r\n                                                                           at com.mikepenz.materialdrawer.model.AbstractBadgeableDrawerItem.bindView(AbstractBadgeableDrawerItem.java:20)\r\n                                                                           at com.mikepenz.fastadapter.FastAdapter$OnBindViewHolderListenerImpl.onBindViewHolder(FastAdapter.java:1835)\r\n                                                                           at com.mikepenz.fastadapter.FastAdapter.onBindViewHolder(FastAdapter.java:573)\r\n                                                                           at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6312)\r\n                                                                           at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5258)\r\n                                                                           at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5521)\r\n                                                                           at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5363)\r\n                                                                           at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5359)\r\n                                                                           at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2141)\r\n                                                                           at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1525)\r\n                                                                           at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1488)\r\n                                                                           at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:585)\r\n                                                                           at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3506)\r\n                                                                           at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3254)\r\n                                                                           at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3767)\r\n                                                                           at android.view.View.layout(View.java:17637)\r\n                                                                           at android.view.ViewGroup.layout(ViewGroup.java:5575)\r\n                                                                           at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)\r\n                                                                           at android.view.View.layout(View.java:17637)\r\n                                                                           at android.view.ViewGroup.layout(ViewGroup.java:5575)\r\n                                                                           at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1217)\r\n                                                                           at android.view.View.layout(View.java:17637)\r\n                                                                           at android.view.ViewGroup.layout(ViewGroup.java:5575)\r\n                                                                           at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)\r\n                                                                           at android.widget.FrameLayout.onLayout(FrameLayout.java:261)\r\n                                                                           at android.view.View.layout(View.java:17637)\r\n                                                                           at android.view.ViewGroup.layout(ViewGroup.java:5575)\r\n                                                                           at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)\r\n                                                                           at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)\r\n                                                                           at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)\r\n                                                                           at android.view.View.layout(View.java:17637)\r\n                                                                           at android.view.ViewGroup.layout(ViewGroup.java:5575)\r\n                                                                           at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)\r\n                                                                           at android.widget.FrameLayout.onLayout(FrameLayout.java:261)\r\n                                                                           at android.view.View.layout(View.java:17637)\r\n                                                                           at android.view.ViewGroup.layout(ViewGroup.java:5575)\r\n                                                                           at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)\r\n                                                                           at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)\r\n                                                                           at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)\r\n                                                                           at android.view.View.layout(View.java:17637)\r\n                                                                           at android.view.ViewGroup.layout(ViewGroup.java:5575)\r\n                                                                           at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)\r\n                                                                           at android.widget.FrameLayout.onLayout(FrameLayout.java:261)\r\n                                                                           at com.android.internal.policy.DecorView.onLayout(DecorView.java:726)\r\n                                                                           at android.view.View.layout(View.java:17637)\r\n                                                                           at android.view.ViewGroup.layout(ViewGroup.java:5575)\r\n                                                                           at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2346)\r\n                                                                           at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2068)\r\n                                                                           at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)\r\n                                                                           at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337)\r\n E/AndroidRuntime:     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)\r\n                                                                           at android.view.Choreographer.doCallbacks(Choreographer.java:686)\r\n                                                                           at android.view.Choreographer.doFrame(Choreographer.java:621)\r\n                                                                           at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)\r\n                                                                           at android.os.Handler.handleCallback(Handler.java:751)\r\n                                                                           at android.os.Handler.dispatchMessage(Handler.java:95)\r\n                                                                           at android.os.Looper.loop(Looper.java:154)\r\n                                                                           at android.app.ActivityThread.main(ActivityThread.java:6119)\r\n                                                                           at java.lang.reflect.Method.invoke(Native Method)\r\n                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)\r\n                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)\r\n```"},"comment":{"url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/comments/272014139","html_url":"https://github.com/mikepenz/MaterialDrawer/issues/1695#issuecomment-272014139","issue_url":"https://api.github.com/repos/mikepenz/MaterialDrawer/issues/1695","id":272014139,"user":{"login":"snijsure","id":1580689,"avatar_url":"https://avatars.githubusercontent.com/u/1580689?v=3","gravatar_id":"","url":"https://api.github.com/users/snijsure","html_url":"https://github.com/snijsure","followers_url":"https://api.github.com/users/snijsure/followers","following_url":"https://api.github.com/users/snijsure/following{/other_user}","gists_url":"https://api.github.com/users/snijsure/gists{/gist_id}","starred_url":"https://api.github.com/users/snijsure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snijsure/subscriptions","organizations_url":"https://api.github.com/users/snijsure/orgs","repos_url":"https://api.github.com/users/snijsure/repos","events_url":"https://api.github.com/users/snijsure/events{/privacy}","received_events_url":"https://api.github.com/users/snijsure/received_events","type":"User","site_admin":false},"created_at":"2017-01-11T22:20:21Z","updated_at":"2017-01-11T22:20:21Z","body":"I am using PrimaryDrawerItem.\r\n\r\n`    PrimaryDrawerItem exploreItem =\r\n        getCustomDrawerItem(R.string.title_discover, R.drawable.icon_drawer_explore,\r\n            R.drawable.icon_drawer_explore_na);\r\n    PrimaryDrawerItem ntkItem = getCustomDrawerItem(R.string.title_ntk, R.drawable.icon_drawer_ntk,\r\n        R.drawable.icon_drawer_ntk_na);\r\n    PrimaryDrawerItem favoritesItem =\r\n        getCustomDrawerItem(R.string.title_favorites, R.drawable.icon_drawer_favorites,\r\n            R.drawable.icon_drawer_favorites_na);`\r\n\r\nAnd using them here:\r\n\r\n`\r\n    navDrawer = new DrawerBuilder().withActivity(this)\r\n        .withToolbar(toolbar)\r\n        .withTranslucentStatusBar(true)\r\n        .withSelectedItem(presenter.getTab())\r\n        .addDrawerItems(exploreItem, ntkItem, favoritesItem)\r\n        .withHeader(header)\r\n        .withStickyFooter(R.layout.footer_drawer)\r\n        .withFooterClickable(true).build();`"}}
{"actor":{"display_login":"snijsure"}}