SyntaxFix
Write A Post
Hire A Developer
Questions
This one worked for me:
In Activity:
User user; public User getUser(){ return this.user;}
In Fragment's onCreateView method:
User user = ((MainActivity)getActivity()).getUser();
Replace the MainActivity with your Activity Name.
MainActivity