Android: Difference between getCount() and getChildCount() in ListView

android, android-listview, java

Solution

`getCount()` returns you a count of items in Adapter (total in list), `getChildCount()` is a `ViewGroup` method that returns you number of subviews. `ListView` actively reuses views so if your list has 1000 items `getCount()` will return 1000, `getChildCount()` - around 10 or so...

Problem

What is difference between `getCount()` and `getChildCount()` in `ListView`?

Original source