How can I set a Fragment\'s Id so that I can use getSupportFragmentManager().findFragmentById(R.id.--)?
Fragment
Id
getSupportFragmentManager().findFragmentById(R.id.--)
Use the following:
To add a fragment:
getFragmentManager().beginTransaction().add(R.id.fragment_container, fragmentToBeAdded, tag).commit();
To identify existing fragment:
getFragmentManager().findFragmentByTag(fragmentName);