Code example for SparseArray

0
    // Paperclip. 
    int paperclipY;
 
    // Cache to save Coordinates based on view width. 
    private static SparseArray<MessageListItemCoordinates> mCache =
            new SparseArray<MessageListItemCoordinates>();
 
    private static TextPaint sPaint = new TextPaint();
 
    static { 
        sPaint.setTypeface(Typeface.DEFAULT);
        sPaint.setAntiAlias(true);
    } 
 
    // Not directly instantiable. 
    private MessageListItemCoordinates() {} 
 
    /** 
     * Returns the mode of the header view (Wide/Normal/Narrow) given the its 
     * measured width. 
     */