android - Calling a Fragment method from a parent Activity -
i see in android fragments dev guide "activity can call methods in fragment acquiring reference fragment fragmentmanager, using findfragmentbyid() or findfragmentbytag()."
the example follows shows how fragment reference, not how call specific methods in fragment.
can give example of how this? call specific method in fragment parent activity. thanks.
not question simple :
examplefragment fragment = (examplefragment) getfragmentmanager().findfragmentbyid(r.id.example_fragment); fragment.<specific_function_name>();
Comments
Post a Comment