0
The simplest way is to override toString()
method of Habit
class:
However the TextView is referenced, it will be filled with the toString() of each object in the array. You can add lists or arrays of custom objects. Override the toString() method of your objects to determine what text will be displayed for the item in the list.
Refer the following Link:
https://developer.android.com/reference/android/widget/ArrayAdapter.html