I am trying to figure out the following code:

Fragment fragment = fm.findFragmentById(R.id.fragmentContainer);

// Check if fragment was found
if (fragment == null) {

    fragment = new CrimeFragment();

    fm.beginTransaction()
            .add(R.id.fragmentContainer, fragment)
            .commit();
}




How does it make sense for the method findFragmentById to take some container 
ID in this case "FrameLayout" when the name of method says Find Fragment?


-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/14fc92b2-cb96-4ec0-9d1b-e5847c85547a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to