My Activity is trying to create an AlertDialog which requires a Context as a parameter. This works as expected if I use:
AlertDialog.Builder builder = new Al
I had to send my context through a constructor on a custom adapter displayed in a fragment and had this issue with getApplicationContext(). I solved it with:
this.getActivity().getWindow().getContext() in the fragments' onCreate callback.
this.getActivity().getWindow().getContext()
onCreate