[Solved] getActivity() From Fragment to Fragment returning null

[ad_1]

 adapter.setOnItemClickListner(new DailyMenuFrag());

The new DailyMenuFrag() here is a new fragment and it is not attached to any activity and hence getActivity() returns null.

Looks like you should use

adapter.setOnItemClickListner(this);

instead to use the current DailyMenuFrag instance as item click listener.

[ad_2]

solved getActivity() From Fragment to Fragment returning null