marcosbeirigo
marcosbeirigo

Reputation: 11318

On the fly android search using quick search box

I've implemented a search in my application using The quick search box, now i want the search results to show on the fly as the user types.
Is it possible?

Upvotes: 0

Views: 545

Answers (1)

Haphazard
Haphazard

Reputation: 10948

Try setting a setOnKeyListener() on your View.

view.setOnKeyListener(new OnKeyListener()
{
    @Override
    public boolean onKey(View v, int keyCode, KeyEvent event)
    {
        if ((event.getAction() == KeyEvent.ACTION_DOWN)
            && (keyCode == KeyEvent.KEYCODE_ENTER))
        {
            // Perform action on key press - pop up your search box and focus on it

            return true;
        }
        return false;
    }
});

Upvotes: 1

Related Questions