Example #1
0
 private void setResultsCursor(Cursor cursor) {
   if (mResultsAdapter == null) {
     return;
   }
   Cursor oldCursor = mResultsAdapter.swapCursor(cursor);
   if (oldCursor != null) {
     oldCursor.close();
   }
 }
 @Override
 public void onTextChanged(CharSequence s, int start, int before, int count) {
   // TODO Auto-generated method stub
   mLastSearchString = s.toString();
   if (s.length() > 3) {
     (new GeoSearchAsyncTask()).execute(new String[] {mLastSearchString});
   } else {
     mSearchResultsListViewAdapter.clearResults();
   }
 }