getChildAt return a View that is null
<p>I try to animate a single item in my <code>ListView</code>, I've figured out that this is kinda hard. But, after some googling I came up with some codesnippets that I combined, but when I try to call my <code>ListView</code>'s <code>getChildAt</code> in order to return the View, this returns null.</p>

<pre><code>public void animateSingleItemInListView() {
        final Animation animBounce = AnimationUtils.loadAnimation(context, R.anim.bounce);
        int totalItemsInListView = lastCases.getCount();
        int wantedPosition = 1; // Whatever position you're looking for
        int firstPosition = lastCases.getFirstVisiblePosition() - lastCases.getHeaderViewsCount(); // This is the same as child #0
        int wantedChild = wantedPosition - firstPosition;
        // Say, first visible position is 8, you want position 10, wantedChild will now be 2
        // So that means your view is child #2 in the ViewGroup:
        int childs = lastCases.getChildCount();
        if (wantedChild &lt; 0) {
          Log.w("UPDATEUI", "Unable to get view for desired position, because it's not being displayed on screen.");
          return;
        }
        // Could also check if wantedPosition is between listView.getFirstVisiblePosition() and listView.getLastVisiblePosition() instead.
        View wantedView = lastCases.getChildAt(firstPosition);
        wantedView.setAnimation(animBounce);
    }
</code></pre>

<p>From the code:</p>

<p>The <code>totalItemsInListView</code> returns 10, which is correct number of rows in my <code>ListView</code>. The integer <code>firstPosition</code> is of course 0, but the <code>getChildAt()</code> method only returns null. How come? How can I get the first <code>View</code> from my <code>ListView</code>? </p>
