hi we are here
The fragment without UI can only be add within the activity programmatically. For this we have different variation of add method available.Use public abstract FragmentTransaction add ( Fragment frag, String tag) frag: fragment we want to add in activity tag: unique ID for identification usually the name of fragment. This method add the fragment in activity .As there is no UI so onCreateView () implementation is not required. Code snippet: FragmentManager fragmentManager = getFragmentManager(); FragmentTransaction fragmentTransaction = fragmentManager .beginTransaction(); ...
Comments
Post a Comment