I know there are many topics about this here. I have also read documentation many times but I can\'t find the best way to pass data from activity to fragment.
I want
Usually the activities will have a reference to their fragments. In your SearchableActivity.java
are you also loading PlaceListFragment.java
either in setContentView(activity_searchable.xml);
or you need to create a instance of the fragment and add/replace a fragment using FragmentTransaction
.
you can find a good example here on how to communicated between fragments or between activity & fragment.
Training link