I\'ve updated the SDK to the latest version (API 23) and the onAttach(Activity) method for fragment is deprecated. So instead of using that method, now I\'m usi
onAttach(Activity)
@Override public void onAttach(Context context) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { super.onAttach(context); onAttachToContext(context); } else { Activity activity = getActivity(); super.onAttach(activity); onAttachToContext(activity); } }