// OVERRIDABLE @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); String name = getIntent().getStringExtra(STRING_EXTRA_NAME); String parentFolder = getIntent().getStringExtra(STRING_EXTRA_PARENTFOLDER); setContentView(R.layout.activity_fragments_single); fragment = (ListPicturesForNameBaseFragment) getFragmentManager().findFragmentByTag(FRAGMENT_TAG); if (fragment == null) { fragment = createFragment(); fragment.setParameters(parentFolder, name); getFragmentManager() .beginTransaction() .add(R.id.fragment_container, fragment, FRAGMENT_TAG) .commit(); getFragmentManager().executePendingTransactions(); } }
/** * onClick action for Button "additional pictures". * * @param view The view triggering the onClick action. */ public final void selectDifferentPictureActivity(final View view) { ListFoldersForDisplaySecondActivity.startActivity(this, fragment.getParentFolder()); }