-
-
Save jezinka/d65eb9dcd2beae5621b9bbcf01db0797 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MealListActivity extends AppCompatActivity { | |
private CoNaObiadDbHelper dbHelper; | |
private String mealName = ""; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_meal_list); | |
final MealContract mealContract = new MealContract(); | |
dbHelper = new CoNaObiadDbHelper(this); | |
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mealContract.getAllMeals(dbHelper)); | |
ListView listView = (ListView) findViewById(R.id.meal_list_view); | |
listView.setAdapter(adapter); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment