Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material Edit Text is not enabled when a view is dynamically inflated #369

Open
thebatman1 opened this issue Jun 6, 2018 · 2 comments
Open

Comments

@thebatman1
Copy link

So I have this app which has a ScrollView and a Button and the ScrollView consists of a Linear Layout where the CardLayout (A linear layout consisting of two (Material)EditTexts) will be inflated. The problem is if I add the view(CardLayout) dynamically, the MaterialEditTexts are disabled automatically. Is there any way to fix this?
But, if I use normal EditTexts, it works fine.
My phone is on API level 23, Android 6.0.1

With normal EditText
without_material_edit_text

With MaterialEditText
with_material_edit_text

@Pedr0Rocha
Copy link

Any workarounds? I'm having the same issue.

@Amandab-u
Copy link

If someone has this same problem I solve it by using:

view.setEnabled(true);
view.setFocusable(true);
view.setFocusableInTouchMode(true);

And now is working fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants