AbstractListView源码分析4
? ? ?* Running state of which positions are currently checked
? ? ?*/
? ? SparseBooleanArray mCheckStates; ?存儲那些位置被選中了
? ?/**
? ? ?* Running state of which IDs are currently checked.
? ? ?* If there is a value for a given key, the checked state for that ID is true
? ? ?* and the value holds the last known position in the adapter for that id.
? ? ?*/
? ? LongSparseArray<Integer> mCheckedIdStates; 那些ID被選中
??/**
? ? ?* Controls how the next layout will happen
? ? ?*/
? ? int mLayoutMode = LAYOUT_NORMAL;當前顯示模式
??/**
? ? ?* Should be used by subclasses to listen to changes in the dataset
? ? */
? ? AdapterDataSetObserver mDataSetObserver;由子類使用來監聽數據庫的改變
??/**
? ? ?* The adapter containing the data to be displayed by this view
? ? ?*/
? ? ListAdapter mAdapter; ? 包含被展示在這個view上的數據
? ?/**
? ? ?* The remote adapter containing the data to be displayed by this view to be set
? ? ?*/
? ? private RemoteViewsAdapter mRemoteAdapter; ?包含數據的遠程adapter展示在這個視圖上,remoteview中嵌入listview時使用。
? ??
? ? ?/**
? ? ?* If mAdapter != null, whenever this is true the adapter has stable IDs.
? ? ?*/
? ? boolean mAdapterHasStableIds; ?作用如果Adapter的hasStableIDS返回true,這樣notifyDataSetChanged的時候,id不變,ListView將不會重新繪制這個view;
? ???/**
? ? ?* This flag indicates the a full notify is required when the RemoteViewsAdapter connects
? ? ?*/
? ? private boolean mDeferNotifyDataSetChanged = false;這個flag表明一個完全的通知是需要當RemoteViewsAdapter連接時。
總結
以上是生活随笔為你收集整理的AbstractListView源码分析4的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: AbstractListView源码分析
- 下一篇: AbstractListView源码分析