{"action":"opened","issue":{"url":"https://api.github.com/repos/zserge/anvil/issues/81","repository_url":"https://api.github.com/repos/zserge/anvil","labels_url":"https://api.github.com/repos/zserge/anvil/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/zserge/anvil/issues/81/comments","events_url":"https://api.github.com/repos/zserge/anvil/issues/81/events","html_url":"https://github.com/zserge/anvil/issues/81","id":176453301,"number":81,"title":"Broken TextInputLayout with support library 24.2.0","user":{"login":"jakubkulhan","id":95001,"avatar_url":"https://avatars.githubusercontent.com/u/95001?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubkulhan","html_url":"https://github.com/jakubkulhan","followers_url":"https://api.github.com/users/jakubkulhan/followers","following_url":"https://api.github.com/users/jakubkulhan/following{/other_user}","gists_url":"https://api.github.com/users/jakubkulhan/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubkulhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubkulhan/subscriptions","organizations_url":"https://api.github.com/users/jakubkulhan/orgs","repos_url":"https://api.github.com/users/jakubkulhan/repos","events_url":"https://api.github.com/users/jakubkulhan/events{/privacy}","received_events_url":"https://api.github.com/users/jakubkulhan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-12T18:47:55Z","updated_at":"2016-09-12T18:47:55Z","closed_at":null,"body":"Android support library 24.2.0 introduced these changes to `TextInputLayout`:\r\n\r\n```diff\r\n     public TextInputLayout(Context context, AttributeSet attrs, int defStyleAttr) {\r\n          ...\r\n+        mInputFrame = new FrameLayout(context);\r\n+        mInputFrame.setAddStatesFromChildren(true);\r\n+        addView(mInputFrame);\r\n          ...\r\n     }\r\n     ...\r\n     public void addView(View child, int index, final ViewGroup.LayoutParams params) {\r\n         if (child instanceof EditText) {\r\n+            mInputFrame.addView(child, new FrameLayout.LayoutParams(params));\r\n+\r\n+            // Now use the EditText's LayoutParams as our own and update them to make enough space\r\n+            // for the label\r\n+            mInputFrame.setLayoutParams(params);\r\n+            updateInputLayoutMargins();\r\n+\r\n             setEditText((EditText) child);\r\n-            super.addView(child, 0, updateEditTextMargin(params));\r\n         } else {\r\n         ...\r\n```\r\n\r\nAnvil's rendering breaks `TextInputLayout` as it always tries to replace `FrameLayout` inside with `EditText`. I really like Anvil's reactive views approach, however, I'd like to also use latest stable support library. Any suggestions how to overcome this? Thank you."}}
{"actor":{"display_login":"jakubkulhan"}}