Skip to content

Instantly share code, notes, and snippets.

@jezinka
Created Mar 11, 2017
Embed
What would you like to do?
private CoNaObiadDbHelper dbHelper;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
dbHelper = new CoNaObiadDbHelper(this);
dbHelper.cleanData();
dbHelper.initializeMealTable();
List<String> preparedRows = DinnerListHelper.getPreparedRows(new Date(), dbHelper.getAllMeals());
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, preparedRows);
ListView listView = (ListView) findViewById(R.id.listview);
listView.setAdapter(adapter);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment