code: public void setAdapter(ListAdapter adapter) {
          if (mAdapter != null) {
              mAdapter.unregisterDataSetObserver(mDataObserver);
          }
  
          mAdapter = adapter;
  
          if (mAdapter != null) {
              mAdapter.registerDataSetObserver(mDataObserver);
              mAreAllItemsSelectable = mAdapter.areAllItemsEnabled();
          }
  
          setupChildren();
  
      }
docs: Sets the data behind this LinearListView.
  
  @param adapter The ListAdapter which is responsible for maintaining the data
  backing this list and for producing a view to represent an
  item in that data set.
  @see #getAdapter()