Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. context = this;
  2. locations = getResources().getStringArray(R.array.locations);
  3.  
  4. final String[] from = new String[] {"locationName"};
  5. final int[] to = new int[] {android.R.id.text1};
  6. locationAdapter = new SimpleCursorAdapter(context,
  7. android.R.layout.simple_list_item_1,
  8. null,
  9. from,
  10. to,
  11. CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);
  12.  
  13. toSearch = (SearchView) findViewById(R.id.toSearch);
  14. toSearch.setSuggestionsAdapter(locationAdapter);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement