Code example for ListAdapter

Methods: getCount

0
        int prevHeightWithoutPartialChild = 0;
        int i;
        View child;
 
        // mItemCount - 1 since endPosition parameter is inclusive 
        endPosition = (endPosition == -1/*NO_POSITION*/) ? adapter.getCount() - 1 : endPosition;
 
        for (i = startPosition; i <= endPosition; ++i) {
            child = mAdapter.getView(i, null, mDropDownList);
            if (mDropDownList.getCacheColorHint() != 0) {
                child.setDrawingCacheBackgroundColor(mDropDownList.getCacheColorHint());
            } 
 
            measureScrapChild(child, i, widthMeasureSpec);
 
            if (i > 0) {
                // Count the divider for all but one child 
                returnedHeight += dividerHeight;
            } 
 
            returnedHeight += child.getMeasuredHeight();