@Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_photo_grid);
   String userId = getIntent().getStringExtra(EXTRA_USER_ID);
   String searchTag = getIntent().getStringExtra(EXTRA_SEARCH_TAG);
   if (savedInstanceState == null) {
     FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
     ft.replace(R.id.flPhotoGridContainer, PhotoGridFragment.newInstance(userId, searchTag));
     ft.commit();
   }
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_photo_grid);

    Intent intent = getIntent();
    userId = intent.getStringExtra(EXTRA_USER_ID);
    searchTag = intent.getStringExtra(EXTRA_SEARCH_TAG);

    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
    PhotoGridFragment fragment = PhotoGridFragment.newInstance(userId, searchTag);
    ft.replace(R.id.flGridPlaceholder, fragment);
    ft.commit();
  }