{"action":"created","issue":{"url":"https://api.github.com/repos/tianzhijiexian/SelectorInjection/issues/3","repository_url":"https://api.github.com/repos/tianzhijiexian/SelectorInjection","labels_url":"https://api.github.com/repos/tianzhijiexian/SelectorInjection/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/tianzhijiexian/SelectorInjection/issues/3/comments","events_url":"https://api.github.com/repos/tianzhijiexian/SelectorInjection/issues/3/events","html_url":"https://github.com/tianzhijiexian/SelectorInjection/issues/3","id":156079563,"number":3,"title":"默认开启了水纹在项目中会崩溃","user":{"login":"isunkui","id":10893176,"avatar_url":"https://avatars.githubusercontent.com/u/10893176?v=3","gravatar_id":"","url":"https://api.github.com/users/isunkui","html_url":"https://github.com/isunkui","followers_url":"https://api.github.com/users/isunkui/followers","following_url":"https://api.github.com/users/isunkui/following{/other_user}","gists_url":"https://api.github.com/users/isunkui/gists{/gist_id}","starred_url":"https://api.github.com/users/isunkui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isunkui/subscriptions","organizations_url":"https://api.github.com/users/isunkui/orgs","repos_url":"https://api.github.com/users/isunkui/repos","events_url":"https://api.github.com/users/isunkui/events{/privacy}","received_events_url":"https://api.github.com/users/isunkui/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-21T02:38:16Z","updated_at":"2016-06-01T03:03:09Z","closed_at":null,"body":"#### 整合进我的项目时候，默认开启了水纹在项目中会崩溃 ####\r\n\r\n- 必须手动在布局文件中将showRipple置为false，才正常使用（跑demo工程没有这个问题）。\r\n- **布局中设置了android:enabled=\"true\"， 也会导致程序崩溃**\r\n\r\n\r\n`手机：小米note`\r\n`miui版本：miui7 6.5.12`\r\n`android版本：6.0.1`\r\n\r\n```java\r\nCaused by: android.content.res.Resources$NotFoundException: File res/drawable/item_background_material.xml from color state list resource ID #0x1080457\r\n\tat android.content.res.Resources.loadColorStateListForCookie(Resources.java:2800)\r\n\tat android.content.res.Resources.loadColorStateList(Resources.java:2749)\r\n\tat android.content.res.TypedArray.getColorStateList(TypedArray.java:487)\r\n\tat android.graphics.drawable.RippleDrawable.updateStateFromTypedArray(RippleDrawable.java:473)\r\n\tat android.graphics.drawable.RippleDrawable.applyTheme(RippleDrawable.java:517)\r\n\tat android.content.res.Resources.loadDrawable(Resources.java:2589)\r\n\tat android.content.res.MiuiResources.loadDrawable(MiuiResources.java:387)\r\n\tat android.content.res.Resources.getDrawable(Resources.java:824)\r\n\tat android.content.Context.getDrawable(Context.java:458)\r\n\tat kale.injection.SelectorInjection.setSelector(SelectorInjection.java:161)\r\n\tat kale.injection.SelectorInjection.injection(SelectorInjection.java:148)\r\n\tat kale.ui.view.SelectorTextView.<init>(SelectorTextView.java:25)\r\n\tat kale.ui.view.SelectorTextView.<init>(SelectorTextView.java:19)\r\n\t... 30 more\r\nCaused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid color state list tag ripple\r\n\tat android.content.res.ColorStateList.createFromXmlInner(ColorStateList.java:217)\r\n\tat android.content.res.ColorStateList.createFromXml(ColorStateList.java:201)\r\n\tat android.content.res.Resources.loadColorStateListForCookie(Resources.java:2796)\r\n\t... 42 more\r\n```"},"comment":{"url":"https://api.github.com/repos/tianzhijiexian/SelectorInjection/issues/comments/222880484","html_url":"https://github.com/tianzhijiexian/SelectorInjection/issues/3#issuecomment-222880484","issue_url":"https://api.github.com/repos/tianzhijiexian/SelectorInjection/issues/3","id":222880484,"user":{"login":"tianzhijiexian","id":9552155,"avatar_url":"https://avatars.githubusercontent.com/u/9552155?v=3","gravatar_id":"","url":"https://api.github.com/users/tianzhijiexian","html_url":"https://github.com/tianzhijiexian","followers_url":"https://api.github.com/users/tianzhijiexian/followers","following_url":"https://api.github.com/users/tianzhijiexian/following{/other_user}","gists_url":"https://api.github.com/users/tianzhijiexian/gists{/gist_id}","starred_url":"https://api.github.com/users/tianzhijiexian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tianzhijiexian/subscriptions","organizations_url":"https://api.github.com/users/tianzhijiexian/orgs","repos_url":"https://api.github.com/users/tianzhijiexian/repos","events_url":"https://api.github.com/users/tianzhijiexian/events{/privacy}","received_events_url":"https://api.github.com/users/tianzhijiexian/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T03:03:09Z","updated_at":"2016-06-01T03:03:09Z","body":"这个问题我看了一下，是因为你没有在theme中提供默认的水波纹颜色。我的demo里面是增加了：\r\n\r\n<style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\r\n        <item name=\"android:selectableItemBackground\">@color/material_grey_600</item>\r\n    </style>\r\n\r\n你提出的问题很多人也可能遇到，所以我可能会去掉这个默认的颜色选项。"}}
{"actor":{"display_login":"tianzhijiexian"}}