Code example for SparseArray

Methods: put

    public Object instantiateItem(ViewGroup container, int position) {
        Object fragment = super.instantiateItem(container, position);
        if (fragment instanceof IssueFragment)
            fragments.put(position, (IssueFragment) fragment);
        return fragment;
    public int getCount() { 
        return issues.length;
     * Deliver dialog result to fragment at given position 
     * @param position 
     * @param requestCode 
     * @param resultCode 
Connect your IDE to all the code out there  Get Codota for Java