I'm working on a CRUD system for my app. I want to use a listview to show all the items from the tables.
When it comes to adding the items to the arraylist, I don't know if I need multiple lines or a single.
Thanks!
When it comes to adding the items to the arraylist, I don't know if I need multiple lines or a single.
Java:
public void ViewCar()
{
Cursor result= db.ViewCar();
if(result.getCount()==0)
{
ShowMessage("ERROR!", "No Car Was Found!");
return;
}
else
{
while(result.moveToNext())
{
carList.add(result.getString(0));
carList.add(result.getString(1)); Right Here- What do I need?
carList.add(result.getString(2));
carList.add(result.getString(3));
}
adapter=new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, carList);
}
Thanks!