Code example for SparseIntArray

Methods: get

0
            return this.moveToPosition(this.mCount-1);
        } 
         
        @Override 
        public boolean moveToPosition(int position) {
            return super.moveToPosition(mPositions.get(position));
        } 
 
         
    } 
 
    @Override 
    public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
 
        AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
        Cursor cursor = mGridAdapter.getCursor();
        if (cursor == null)
            return; 
        cursor.moveToPosition(info.position);
        String mediaId = cursor.getString(cursor.getColumnIndex("mediaId"));
Connect your IDE to all the code out there  Get Codota for Java