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

com.pchmn.materialchips.ChipsInput.setEnable(false) does not work android #115

Open
kiranNanda opened this issue Sep 5, 2018 · 2 comments

Comments

@kiranNanda
Copy link

com.pchmn.materialchips.ChipsInput.setEnable(false) does not work android

@jurestanic2
Copy link

I've solved this problem by creating my own ChipsInput class that extends ChipsInput. Just override getEditText and setEnabled methods. You can then use your new class in XML files just like the original one. Here is my example :

public class MyChipsInput extends ChipsInput {

private ChipsInputEditText editText;

public MyChipsInput(Context context) {
    super(context);
}

public MyChipsInput(Context context, AttributeSet attrs) {
    super(context, attrs);
}

@Override
public ChipsInputEditText getEditText() {
    editText = new ChipsInputEditText(getContext());
    return editText;
}

@Override
public void setEnabled(boolean b){
    editText.setEnabled(b);
}

}

@FaridBen95
Copy link

@jurestanic it's not working could explain more ?

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