Code example for Adapter

Methods: getCount

0
	} 
 
	@Override 
	public int getCount() { 
		// Total number of items is the combination of categories AND regular items 
		return mGroupAdapter.getCount() + mItemAdapter.getCount();
	} 
 
	@Override 
	public boolean isEnabled(int position)
	{ 
		int groupno = 0;
		int relativepos = position;
		// Find if it is a category header by counting through categories 
		while (mGroupCounts[groupno] + 1 <= relativepos)
		{ 
			// If this is the first time checking the count, load it up 
			if (mGroupCounts[groupno] < 0)
			{ 
				mGroupCursor.moveToPosition(groupno);
				mGroupCounts[groupno] = mGroupCursor.getInt(mGroupCountCol);