private void clearResults() {
    if (adapter != null) {
      boolean wasSelection = !selectionStrategy.isEmpty();
      boolean wasData = !adapter.isEmpty();

      loadingStrategy.clearResults();
      selectionStrategy.clear();
      adapter.notifyDataSetChanged();

      // Tell anyone who cares the data and selection has changed, if they have.
      if (wasData && onDataChangedListener != null) {
        onDataChangedListener.onDataChanged(PickerFragment.this);
      }
      if (wasSelection && onSelectionChangedListener != null) {
        onSelectionChangedListener.onSelectionChanged(PickerFragment.this);
      }
    }
  }
 public boolean isDataPresentOrLoading() {
   return !adapter.isEmpty() || loader.isLoading();
 }
 void layoutActivityCircle() {
   // If we've got no data, make the activity circle full-opacity. Otherwise we'll dim it to avoid
   //  cluttering the UI.
   float alpha = (!adapter.isEmpty()) ? .25f : 1.0f;
   setAlpha(activityCircle, alpha);
 }