Code example for Filter

Methods: filter

0
     
    protected void onSearchTextChanged() { 
        // Set the proper empty string 
 
        Filter filter = mAdapter.getFilter();
        filter.filter(getTextFilter());
    } 
 
    public boolean onKeyPreIme(int keyCode, KeyEvent event) {
        // TODO Auto-generated method stub 
        if (keyCode == KeyEvent.KEYCODE_BACK && TextUtils.isEmpty(getTextFilter())) {
            hideSoftKeyboard(); 
            onBackPressed();
            return true; 
        } 
        return false; 
    } 
     
    /** 
     * Dismisses the soft keyboard when the list takes focus. 
Stop searching for code, let great code find you!  Add Codota to your java IDE