1

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 :

  • Task 1
  • Task 2

And, I'm trying to do :

  • Task 1
  • Task's description 1
  • Task 2
  • Task's description 2

How it's possible to add multiple id ?

Meugiwara
  • 599
  • 1
  • 7
  • 13

1 Answers1

2

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