{"action":"created","issue":{"url":"https://api.github.com/repos/afollestad/material-dialogs/issues/589","labels_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/589/labels{/name}","comments_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/589/comments","events_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/589/events","html_url":"https://github.com/afollestad/material-dialogs/issues/589","id":90691036,"number":589,"title":"android:paddingStart attribute without API level qualifier caused crashes on some API < 17 devices","user":{"login":"yukuku","id":1407837,"avatar_url":"https://avatars.githubusercontent.com/u/1407837?v=3","gravatar_id":"","url":"https://api.github.com/users/yukuku","html_url":"https://github.com/yukuku","followers_url":"https://api.github.com/users/yukuku/followers","following_url":"https://api.github.com/users/yukuku/following{/other_user}","gists_url":"https://api.github.com/users/yukuku/gists{/gist_id}","starred_url":"https://api.github.com/users/yukuku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukuku/subscriptions","organizations_url":"https://api.github.com/users/yukuku/orgs","repos_url":"https://api.github.com/users/yukuku/repos","events_url":"https://api.github.com/users/yukuku/events{/privacy}","received_events_url":"https://api.github.com/users/yukuku/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/afollestad/material-dialogs/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-24T14:24:38Z","updated_at":"2015-07-01T12:40:11Z","closed_at":null,"body":"In files like `library/src/main/res/layout/md_listitem_singlechoice.xml`\r\n\r\nThere is a `android:paddingStart` attribute, that looks harmless. But actually it's not harmless, that's why lint warns us that that attribute should not be used unless you put the xml file inside the `-v17` qualifier.\r\n\r\nThe reference is this bug: https://code.google.com/p/android/issues/detail?id=60055\r\n\r\nIn my app, which uses material-dialogs, there has been around 30 reports of crashes with the following stack traces:\r\n\r\n    android.view.InflateException: Binary XML file line #23: Error inflating class TextView\r\n    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:710)\r\n    at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)\r\n    at android.view.LayoutInflater.inflate(LayoutInflater.java:495)\r\n    at android.view.LayoutInflater.inflate(Native Method)\r\n    at android.view.LayoutInflater.inflate(LayoutInflater.java:397)\r\n    at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:371)\r\n    at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)\r\n    at com.afollestad.materialdialogs.MaterialDialogAdapter.getView(Somewhere:45)\r\n    at android.widget.AbsListView.obtainView(AbsListView.java:2472)\r\n    at android.widget.ListView.measureHeightOfChildren(ListView.java:1250)\r\n    at android.widget.ListView.onMeasure(ListView.java:1162)\r\n    at android.view.View.measure(View.java:15562)\r\n    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5107)\r\n    at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)\r\n    at android.view.View.measure(View.java:15562)\r\n    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5107)\r\n    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1396)\r\n    at android.widget.LinearLayout.measureVertical(LinearLayout.java:681)\r\n    at android.widget.LinearLayout.onMeasure(LinearLayout.java:574)\r\n    at android.view.View.measure(View.java:15562)\r\n    at com.afollestad.materialdialogs.internal.MDRootLayout.onMeasure(Somewhere:194)\r\n    at android.view.View.measure(View.java:15562)\r\n    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5107)\r\n    at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)\r\n    at android.view.View.measure(View.java:15562)\r\n    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5107)\r\n    at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1396)\r\n    at android.widget.LinearLayout.measureVertical(LinearLayout.java:681)\r\n    at android.widget.LinearLayout.onMeasure(LinearLayout.java:574)\r\n    at android.view.View.measure(View.java:15562)\r\n    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5107)\r\n    at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)\r\n    at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2423)\r\n    at android.view.View.measure(View.java:15562)\r\n    at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2031)\r\n    at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1224)\r\n    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1425)\r\n    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1142)\r\n    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4709)\r\n    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)\r\n    at android.view.Choreographer.doCallbacks(Choreographer.java:555)\r\n    at android.view.Choreographer.doFrame(Choreographer.java:525)\r\n    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)\r\n    at android.os.Handler.handleCallback(Handler.java:615)\r\n    at android.os.Handler.dispatchMessage(Handler.java:92)\r\n    at android.os.Looper.loop(Looper.java:137)\r\n    at android.app.ActivityThread.main(ActivityThread.java:4947)\r\n    at java.lang.reflect.Method.invokeNative(Native Method)\r\n    at java.lang.reflect.Method.invoke(Method.java:511)\r\n    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)\r\n    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)\r\n    at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)\r\n    at dalvik.system.NativeStart.main(Native Method)\r\n    Caused by: java.lang.NumberFormatException: Invalid int: \"6.0dip\"\r\n    at java.lang.Integer.invalidInt(Integer.java:138)\r\n    at java.lang.Integer.parse(Integer.java:375)\r\n    at java.lang.Integer.parseInt(Integer.java:366)\r\n    at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)\r\n    at android.content.res.TypedArray.getInt(TypedArray.java:254)\r\n    at android.content.res.XResources$XTypedArray.getInt(XResources.java:1002)\r\n    at android.widget.TextView.<init>(TextView.java:1072)\r\n    at android.support.v7.widget.AppCompatTextView.<init>(Somewhere:44)\r\n    at android.support.v7.widget.AppCompatTextView.<init>(Somewhere:40)\r\n    at android.support.v7.internal.app.AppCompatViewInflater.createView(Somewhere:99)\r\n    at android.support.v7.app.AppCompatDelegateImplV7.createView(Somewhere:782)\r\n    at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(Somewhere:810)\r\n    at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(Somewhere:44)\r\n    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:681)\r\n    ... 54 more\r\n\r\nThe solution should be removing the `android:paddingStart` from the file mentioned above and similar files, and use the `-ldrtl` qualifier to support RTL."},"comment":{"url":"https://api.github.com/repos/afollestad/material-dialogs/issues/comments/117644516","html_url":"https://github.com/afollestad/material-dialogs/issues/589#issuecomment-117644516","issue_url":"https://api.github.com/repos/afollestad/material-dialogs/issues/589","id":117644516,"user":{"login":"yukuku","id":1407837,"avatar_url":"https://avatars.githubusercontent.com/u/1407837?v=3","gravatar_id":"","url":"https://api.github.com/users/yukuku","html_url":"https://github.com/yukuku","followers_url":"https://api.github.com/users/yukuku/followers","following_url":"https://api.github.com/users/yukuku/following{/other_user}","gists_url":"https://api.github.com/users/yukuku/gists{/gist_id}","starred_url":"https://api.github.com/users/yukuku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yukuku/subscriptions","organizations_url":"https://api.github.com/users/yukuku/orgs","repos_url":"https://api.github.com/users/yukuku/repos","events_url":"https://api.github.com/users/yukuku/events{/privacy}","received_events_url":"https://api.github.com/users/yukuku/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T12:40:11Z","updated_at":"2015-07-01T12:40:11Z","body":"@hzsweers  Thanks! Confirmed with building material-dialogs with Build Tools 22.0.1:\r\n\r\n    \t   android:paddingStart=\"@dimen/md_listitem_control_margin\"\r\n\r\ndoes not appear in `layout/md_listitem_singlechoice.xml`, and then a copy of the original file is generated at `layout-v17` folder. \r\n\r\nSame with the original `layout-ldrtl` variant — the original is automatically located at `layout-ldrtl-v17`, and the one without the `paddingStart` is at `layout-ldrtl` folder."}}