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

hide the filterable list + request focus to open keyboard #98

Open
crearo opened this issue Apr 8, 2018 · 1 comment
Open

hide the filterable list + request focus to open keyboard #98

crearo opened this issue Apr 8, 2018 · 1 comment

Comments

@crearo
Copy link

crearo commented Apr 8, 2018

For the most part of it, this library is great. However, I've been pulling my hair over simple issues.

  1. How do I hide the filterable list manually? Once it's open, there's no way to close it other than clicking an item. I've tried
  • mChipsInput.setFilterableList(new ArrayList<ChipInterface>());
  • mChipsInput.getEditText().getFilterableListView().fadeOut();
  • mChipsInput.getEditText().getFilterableListView().fadeOut();
  • mChipsInput.getFilterableList().clear(), and called mChipsInput.invalidate() afterwards

The view logic is just so poorly designed, none of these seem to work. I've been digging into the source code and see that fadeOut() is to hide it from within the library. Why doesn't it work when used as an api?

  1. Open the soft-keyboard automatically when the mChipsInput is clicked.
    I've tried the following:

     mChipsInput.requestFocus();
     mChipsInput.getEditText().requestFocus();
     openKeyboard(mChipsInput.getEditText());  // this uses the InputManager to open the keyboard on this view.
     mChipsInput.getEditText().performClick();
    

Again, none of these work!

@crearo
Copy link
Author

crearo commented Apr 8, 2018

Turns out it was a really silly line in the code that was causing the issue as for 1.
I've sent a PR #99

It creates the edittext only once, instead of creating a new one each time getEditText is called.

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

1 participant