In my activity, I call a method which is inside of a fragment to update a ListView in the fragment. However, the getActivity() method returns null, the listView is null, the adapter is null too. But I can see the listView is being displayed. Why are they null?
Note:
I call FragmentPagerAdapter.getItem(position) to get the fragment. However, it will return a different instance. According to here, I can reuse the fragment by findFragmentByTag.