AbstractListView源码分析5

    /**
     * Indicates whether the list selector should be drawn on top of the children or behind
     */

    boolean mDrawSelectorOnTop = false;  表明了list selector是否应该绘制在children的顶部还是后面


   /**
     * The drawable used to draw the selector
     */
    Drawable mSelector;分隔符的图片


    /**
     * The current position of the selector in the list.
     */
    int mSelectorPosition = INVALID_POSITION; 目前选择selector的位置


    /**
     * Defines the selector's location and dimension at drawing time
     */
    Rect mSelectorRect = new Rect(); 定义selector的位置和区域在绘制时


    /**
     * The data set used to store unused views that should be reused during the next layout
     * to avoid creating new ones
     */
    final RecycleBin mRecycler = new RecycleBin(); Listview的缓存机制


   /**
     * The selection's left padding
     */
    int mSelectionLeftPadding = 0;


    /**
     * The selection's top padding
     */
    int mSelectionTopPadding = 0;


    /**
     * The selection's right padding
     */
    int mSelectionRightPadding = 0;


    /**
     * The selection's bottom padding
     */
    int mSelectionBottomPadding = 0;


    /**
     * This view's padding
     */
    Rect mListPadding = new Rect();

以上属性表示Padding



你可能感兴趣的:(Android应用层源码分析)