Answers for "how to call main activity method from fragment"

0

calling activity method from fragment:

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

fragment call activity

Intent myIntent = new Intent((ParentActivity)getActivity(), YourOtherActivity.class);
(ParentActivity)getActivity().startActivity(myIntent);
Posted by: Guest on January-11-2022

Code answers related to "how to call main activity method from fragment"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language