Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SimpleCursorAdapter SimpleCursorAdapter;
- ListView listWords = (ListView) findViewById(R.id.listWords);
- wordsRepo wordsRepo = new wordsRepo(this);
- TextView textview= (TextView) findViewById(R.id.textView);
- private void showWords()
- {
- Cursor cursor = wordsRepo.getword();
- if (cursor == null)
- {
- textview.setText("Error");
- return;
- }
- if (cursor.getCount() == 0)
- {
- textview.setText("No Words.");
- return;
- }
- String[] from = new String[] {word.KEY_EN_NAME};
- int[] to = new int[] {android.R.id.text1};
- SimpleCursorAdapter = new SimpleCursorAdapter(this,android.R.layout.simple_list_item_1,cursor,from,to,0);
- listCategories.setAdapter(SimpleCursorAdapter);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement