源码实现了列表可支持多选框功能的Adapter,主要是给列表(ListView)提供多选框功能(Multiple Choice)的Adapter,从而可以很方便让ListView支持多选功能。除了ListView,这个Adapter也可以用在GridView中,。 MultiChoiceAdapter is an implementation of ListAdapter which adds support for modal multiple choice selection as in the native Gmail app. It provides a functionality similar to that of the CHOICE_MODE_MULTIPLE_MODAL ListView mode, with two additional benefits: It is easier to use, as it keeps count of the selected items, updates their background accordingly and handles checkboxes transparently. It is compatible with every version of Android from 2.x. Of course, this implies that your project must use either ActionBarSherlock or the support library is ActionBarCompat. A version of the library that works with the stock action is also provided, for those apps with minSdkVersion=11 or newer.