Here is my declared ArrayAdapter :
itemsAdapter = new ArrayAdapter<String>(this,
R.layout.activity_task,
R.id.taskTitle,
items1);
I wanted to do that :
itemsAdapter = new ArrayAdapter<String>(this,
R.layout.activity_task,
R.id.taskTitle,
items1,
R.id.taskNews,
items2);
Because, my app is like :
And, I'm trying to do :
How it's possible to add multiple id ?
If you are using list view to show the text items, then you can only use one layout and one text view using standard ArrayAdapter.
To use two TextView's try making a CustomListAdapter
Use this link for reference on CustomListAdapter
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.