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

Softkeyboard not hiding after selecting a suggested search-term in the list #27

Open
calav3ra opened this issue Feb 6, 2013 · 5 comments
Labels

Comments

@calav3ra
Copy link
Contributor

calav3ra commented Feb 6, 2013

Softkeyboard not hiding after selecting a suggested search-term in the list

This is not a bug, i think it is missing feature.

Let's say i want to enter some text to search the log entries for. A keyboard pops ups, and when i start for example with "teth" then theres some activities listed containing the word tethering. So i click on one of those suggested terms, and it succesfully lists the log entries for this term. But the keyboard, that previously got opened, doesn't close. But i am finished looking for what i was seeking.

@calav3ra
Copy link
Contributor Author

calav3ra commented Feb 6, 2013

I think this may be related to SortedFilterArrayAdapter.
Maybe those have to register some onclick listener to dismiss the keyboard?
Hope this could help :)

@nolanlawson
Copy link
Owner

Hmmm, interesting. I wonder why I never noticed this before. I'll check it out, thanks!

@calav3ra
Copy link
Contributor Author

Like here: Thats what i meant:
https://lh6.ggpht.com/WNRUHXiVKX0gu4jOuMEDLz4JVwtaElHQpacSApIrs2nNPROS8FGGuaF0mflbHUmQPEM

Here is how to close the keyboard:
http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard

Now you only need to find the proper event. :)

@calav3ra
Copy link
Contributor Author

Got it. Add this, and please check for side-effects (though i think there wont be any)...

in:

private void setUpWidgets() {

    ....

    searchEditText.setOnItemClickListener(new OnItemClickListener()
    {
        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id)
        {
            InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
            imm.hideSoftInputFromWindow(searchEditText.getWindowToken(), 0);
        }
    });

@nolanlawson
Copy link
Owner

Sorry to be a stickler, but could you please turn this into a pull request? That would make it easier for me to test and integrate. Thanks!

calav3ra added a commit to calav3ra/Catlog that referenced this issue Mar 4, 2013
…gestions being clicked

possible fix for Issue nolanlawson#27: softkeyboard not hiding on suggestions being
clicked
nolanlawson added a commit that referenced this issue Mar 9, 2013
possible fix for Issue #27: softkeyboard not hiding on suggestions being clicked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants