@Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreateView(inflater, container, savedInstanceState);
   mNoResultsLayout = mLayout.findViewById(R.id.no_search_results_layout);
   return mLayout;
 }
 @Override
 public void onPhotosReady(List<Photo> photos, Exception e) {
   super.onPhotosReady(photos, e);
   if (photos != null && photos.isEmpty()) {
     /* If first page (2 as mPage will have already been incremented),
      * and results are empty, show no search results layout */
     if (mPage == 2) {
       mNoResultsLayout.setVisibility(View.VISIBLE);
       mGridView.setVisibility(View.GONE);
     }
   }
 }
 @Override
 public void onActivityCreated(Bundle savedInstanceState) {
   super.onActivityCreated(savedInstanceState);
   if (savedInstanceState != null && "".equals(mSearchQuery)) {
     String searchQuery = savedInstanceState.getString(KEY_SEARCH_QUERY);
     if (searchQuery != null) {
       mSearchQuery = searchQuery;
     } else {
       Log.e(TAG, "No searchquery found in savedInstanceState");
     }
   }
 }
 @Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
   super.onCreateOptionsMenu(menu, inflater);
   inflater.inflate(R.menu.search_menu, menu);
 }
 @Override
 public void onSaveInstanceState(Bundle bundle) {
   super.onSaveInstanceState(bundle);
   bundle.putString(KEY_SEARCH_QUERY, mSearchQuery);
 }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   mShowDetailsOverlay = false;
 }