Code example for SparseArray

Methods: put

0
 
    @Override 
    public Object instantiateItem(ViewGroup container, int position) {
        Object fragment = super.instantiateItem(container, position);
        if (fragment instanceof IssueFragment)
            fragments.put(position, (IssueFragment) fragment);
        return fragment;
    } 
 
    @Override 
    public int getCount() { 
        return issues.length;
    } 
 
    /** 
     * Deliver dialog result to fragment at given position 
     * 
     * @param position 
     * @param requestCode 
     * @param resultCode 
     * @param arguments