import android.content.Context;
import android.content.DialogInterface;
import android.database.Cursor;
import android.content.Context;
import android.content.DialogInterface;
import android.database.Cursor;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
// If we don't use `android.support.v7.app.AlertDialog` instead of `android.app.AlertDialog` then the dialog will be covered by the keyboard.
import android.support.v4.content.ContextCompat;
// If we don't use `android.support.v7.app.AlertDialog` instead of `android.app.AlertDialog` then the dialog will be covered by the keyboard.
import android.support.v4.content.ContextCompat;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CursorAdapter;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CursorAdapter;
// The public interface is used to send information back to the parent activity.
public interface MoveToFolderListener {
// The public interface is used to send information back to the parent activity.
public interface MoveToFolderListener {
// `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
@SuppressLint("InflateParams")
@Override
// `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
@SuppressLint("InflateParams")
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Use `AlertDialog.Builder` to create the `AlertDialog`. The style formats the color of the button text.
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity(), R.style.LightAlertDialog);
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Use `AlertDialog.Builder` to create the `AlertDialog`. The style formats the color of the button text.
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity(), R.style.LightAlertDialog);