I would like to create a list of notes with a due date. If the due date is reached, the background color should change.

I tried to manage the items in an ArrayAdapter and bind the adapter to the listview of the listview activity.

I found the methodes getChildCount() and getHeaderViewsCount() but both return 0.

Here is the code I tried:

```
ListView lv = (ListView) findViewById(android.R.id.list);
lv.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mStringList));
for (int i = lv.getFirstVisiblePosition(); i < lv.getChildCount(); i++) {
            View v = lv.getChildAt(i);
            Log.d("MyActivity", String.valueOf(v.getId()));
            v.setBackgroundColor(Color.GREEN);
        }

```

As getFirstVisiblePosition returns 0 and getChildCount returns 0 the loop will never be entered.

Are these the correct methods for accessing the child-elements of a listview?