{"action":"created","issue":{"url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/524","repository_url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker","labels_url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/524/labels{/name}","comments_url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/524/comments","events_url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/524/events","html_url":"https://github.com/wdullaer/MaterialDateTimePicker/issues/524","id":359125973,"node_id":"MDU6SXNzdWUzNTkxMjU5NzM=","number":524,"title":"InflationException with DatepickerDialog","user":{"login":"moda20","id":23613485,"node_id":"MDQ6VXNlcjIzNjEzNDg1","avatar_url":"https://avatars3.githubusercontent.com/u/23613485?v=4","gravatar_id":"","url":"https://api.github.com/users/moda20","html_url":"https://github.com/moda20","followers_url":"https://api.github.com/users/moda20/followers","following_url":"https://api.github.com/users/moda20/following{/other_user}","gists_url":"https://api.github.com/users/moda20/gists{/gist_id}","starred_url":"https://api.github.com/users/moda20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moda20/subscriptions","organizations_url":"https://api.github.com/users/moda20/orgs","repos_url":"https://api.github.com/users/moda20/repos","events_url":"https://api.github.com/users/moda20/events{/privacy}","received_events_url":"https://api.github.com/users/moda20/received_events","type":"User","site_admin":false},"labels":[{"id":162704753,"node_id":"MDU6TGFiZWwxNjI3MDQ3NTM=","url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-09-11T16:31:43Z","updated_at":"2018-09-24T19:31:31Z","closed_at":"2018-09-20T16:56:53Z","author_association":"NONE","body":"hi !\r\n\r\nI am calling this repo in a Cordova plugin and encountered this problem. \r\n\r\nhere is the calling code :\r\n\r\n```java\r\n Calendar now = Calendar.getInstance();\r\n            DatePickerDialog dpd =  DatePickerDialog.newInstance(\r\n                     new DatePickerDialog.OnDateSetListener(){\r\n                        @Override\r\n                        public void onDateSet(DatePickerDialog view, int year, int month, int dayOfMonth) {\r\n                            Log.d(\"Orignal\", \"Got clicked\");\r\n                        }\r\n                    },\r\n                    now.get(Calendar.YEAR),\r\n                    now.get(Calendar.MONTH),\r\n                    now.get(Calendar.DAY_OF_MONTH)\r\n            );\r\n            /*dpd.setThemeDark(true);*/\r\n            /*dpd.setAccentColor(Color.parseColor(\"#9C27B0\"));*/\r\n            dpd.show(cordova.getActivity().getFragmentManager(),\"Datepickerdialog\");\r\n```\r\n\r\n```\r\nandroid.view.InflateException: Binary XML file line #4: Binary XML file line #4: Error inflating class android.widget.ImageButton\r\n    Caused by: android.view.InflateException: Binary XML file line #4: Error inflating class android.widget.ImageButton\r\n    Caused by: java.lang.reflect.InvocationTargetException\r\n        at java.lang.reflect.Constructor.newInstance0(Native Method)\r\n        at java.lang.reflect.Constructor.newInstance(Constructor.java:430)\r\n        at android.view.LayoutInflater.createView(LayoutInflater.java:645)\r\n        at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)\r\n        at android.view.LayoutInflater.onCreateView(LayoutInflater.java:717)\r\n        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:785)\r\n        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)\r\n        at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)\r\n        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)\r\n        at android.view.LayoutInflater.inflate(LayoutInflater.java:518)\r\n        at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)\r\n        at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:360)\r\n        at android.view.LayoutInflater.inflate(<Xposed>)\r\n        at android.view.LayoutInflater.inflate(LayoutInflater.java:426)\r\n        at com.wdullaer.materialdatetimepicker.date.DayPickerGroup.init(DayPickerGroup.java:50)\r\n        at com.wdullaer.materialdatetimepicker.date.DayPickerGroup.<init>(DayPickerGroup.java:32)\r\n        at com.wdullaer.materialdatetimepicker.date.DatePickerDialog.onCreateView(DatePickerDialog.java:370)\r\n        at android.app.Fragment.performCreateView(Fragment.java:2352)\r\n        at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:995)\r\n        at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)\r\n        at android.app.BackStackRecord.run(BackStackRecord.java:815)\r\n        at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1578)\r\n        at android.app.FragmentManagerImpl$1.run(FragmentManager.java:483)\r\n        at android.os.Handler.handleCallback(Handler.java:836)\r\n        at android.os.Handler.dispatchMessage(Handler.java:103)\r\n        at android.os.Looper.loop(Looper.java:203)\r\n        at android.app.ActivityThread.main(ActivityThread.java:6275)\r\n        at java.lang.reflect.Method.invoke(Native Method)\r\n        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)\r\n        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)\r\n        at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)\r\n     Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 13: TypedValue{t=0x2/d=0x7f030100 a=-1}\r\n        at android.content.res.TypedArray.getDrawable(TypedArray.java:928)\r\n        at android.content.res.XResources$XTypedArray.getDrawable(XResources.java:1363)\r\n        at android.view.View.<init>(View.java:4230)\r\n        at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)\r\n        at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:360)\r\n        at android.view.View.<init>(<Xposed>)\r\n        at android.widget.ImageView.<init>(ImageView.java:150)\r\n        at android.widget.ImageButton.<init>(ImageButton.java:84)\r\n        at android.widget.ImageButton.<init>(ImageButton.java:80)\r\n```\r\n\r\nany help ?"},"comment":{"url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/comments/424096784","html_url":"https://github.com/wdullaer/MaterialDateTimePicker/issues/524#issuecomment-424096784","issue_url":"https://api.github.com/repos/wdullaer/MaterialDateTimePicker/issues/524","id":424096784,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDA5Njc4NA==","user":{"login":"moda20","id":23613485,"node_id":"MDQ6VXNlcjIzNjEzNDg1","avatar_url":"https://avatars3.githubusercontent.com/u/23613485?v=4","gravatar_id":"","url":"https://api.github.com/users/moda20","html_url":"https://github.com/moda20","followers_url":"https://api.github.com/users/moda20/followers","following_url":"https://api.github.com/users/moda20/following{/other_user}","gists_url":"https://api.github.com/users/moda20/gists{/gist_id}","starred_url":"https://api.github.com/users/moda20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moda20/subscriptions","organizations_url":"https://api.github.com/users/moda20/orgs","repos_url":"https://api.github.com/users/moda20/repos","events_url":"https://api.github.com/users/moda20/events{/privacy}","received_events_url":"https://api.github.com/users/moda20/received_events","type":"User","site_admin":false},"created_at":"2018-09-24T19:31:31Z","updated_at":"2018-09-24T19:31:31Z","author_association":"NONE","body":"I did find a way to make it work, by changing \r\n`android:background=\"?attr/selectableItemBackgroundBorderless\"\r\n`\r\nto \r\n\r\n`android:background=\"?android:attr/selectableItemBackgroundBorderless\"\r\n`\r\n\r\non mdtp_daypicker_group in the two `ImageButton`"}}
{"actor":{"display_login":"moda20"}}