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 ?

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.