ArrayList myList = new ArrayList();
ListView listView = (ListView) findViewById(R.id.list);
ArrayAdapter<MyClass> adapter = new ArrayAdapter<MyClass>(this, R.layout.row, to, myList.);
listView.setAdapter(adapter);
Class: MyClass
class MyClass {
public String reason;
public long long_val;
}
I want to show this in listView. I have created row.xml in layouts, but don't know how to show both String and long.converted into toString() in the ListView using ArrayAdapter.
Please Help me.