When using getContext to get the fragment’s context, if the IDE tells you that the getContext call requires API version 23 and current minimum is set to 15, make sure that the import for DialogFragment is import android.support.v4.app.DialogFragment instead of import android.app.DialogFragment. The same applies to Fragment too.

Leave a Reply

Your email address will not be published. Required fields are marked *