Code example for SparseArray

Methods: valueAt

0
		return mArray.size();
	} 
 
	@Override 
	public Object getItem(int position) {
		return mArray.valueAt(position);
	} 
 
	@Override 
	public long getItemId(int position) {
		return mArray.keyAt(position);
	} 
	 
	public int getPosition(int index) {
		return mArray.indexOfKey(index);
	} 
 
	@Override 
	public View getView(int position, View convertView, ViewGroup parent) {
		return getViewWithResource(position, convertView, parent, 
				android.R.layout.simple_spinner_item);