Answers for "call a functino of activity inside fragment android"

0

calling activity method from fragment:

((YourActivityClassName)getActivity()).yourPublicMethod();
Posted by: Guest on July-31-2021
-1

calling fragment method from activity

ExampleFragment fragment = (ExampleFragment) getFragmentManager().findFragmentById(R.id.example_fragment); 
fragment.specific_function_name();
Posted by: Guest on June-03-2021

Code answers related to "call a functino of activity inside fragment android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language