Unable to display listview data after filter
<p>I have a listview adapter filter that is correctly filttering my inputted text with the use of a like statement. </p>

<p>The issue I am having is that when my app loads, all the data is displayed in the listview. When the filter is applied it correctly filters to the supplid text, <strong>what I cant do is have it so that once the edittext is blank again (i.e the search string is deleted), all of the data is redisplayed in the listview.</strong></p>

<p>The following screenshots display the issue:</p>

<p>Loaded list:</p>

<p><img src="http://i.stack.imgur.com/jG1HU.jpg" alt="enter image description here"></p>

<p>Filter text 'a'. Apple displayed as expected:</p>

<p><img src="http://i.stack.imgur.com/PjiQL.jpg" alt="enter image description here"></p>

<p>Issue: When the 'a' is deleted, the listview is not reloaded.</p>

<p><img src="http://i.stack.imgur.com/q6Hnh.jpg" alt="enter image description here"></p>

<p>Code for the filter:</p>

<pre><code>        itemNameEdit = (EditText) findViewById(R.id.inputName);

    showItems.setTextFilterEnabled(true);

    itemNameEdit.addTextChangedListener(new TextWatcher()
     {


        @Override
        public void afterTextChanged(Editable s) {

        }

        @Override
        public void beforeTextChanged(CharSequence s, int start, int count,
                int after) {

        }

        @Override
        public void onTextChanged(CharSequence s, int start, int before,
                int count) {

            cursorAdapter.getFilter().filter(s.toString());

        }


     });


    getCons = new DBHandlerShop (this, null, null);

     cursorAdapter.setFilterQueryProvider(new FilterQueryProvider()
    {
        public Cursor runQuery(CharSequence constraint)
        {

            getCons.open();
            return getCons.getChanges(constraint.toString());


        }

    });
     showItems.setAdapter(cursorAdapter);
</code></pre>

<p>getChanges method:</p>

<pre><code>public Cursor getChanges(String constraintPassed) {

        String [] columns = new String[]{KEY_ROWSHOPID, KEY_ITEMSHOP, KEY_ITEMNUM, KEY_ITEMPRICE};
        Cursor c = null;
         if(constraintPassed == "" || constraintPassed.length() == 0)
         {
             c = ourDatabase.query(DATABASE_TABLESHOP, columns, null, null, null, KEY_ITEMSHOP + " ASC", null); 


         }

         else
         {

            c = ourDatabase.query(DATABASE_TABLESHOP, columns, KEY_ITEMSHOP + " LIKE'" + constraintPassed + "%'", null, null, null, KEY_ITEMSHOP + " ASC", null);

         }

        if( c != null)
            {
                c.moveToFirst();
                //return c;

            }
        return c;
    }
</code></pre>
