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;
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 {
}
// `moveToFolderListener` is used in `onAttach()` and `onCreateDialog`.
private MoveToFolderListener moveToFolderListener;
}
// `moveToFolderListener` is used in `onAttach()` and `onCreateDialog`.
private MoveToFolderListener moveToFolderListener;
}
}
// `exceptFolders` is used in `onCreateDialog()` and `addSubfoldersToExceptFolders()`.
private String exceptFolders;
}
}
// `exceptFolders` is used in `onCreateDialog()` and `addSubfoldersToExceptFolders()`.
private String exceptFolders;
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);
dialogBuilder.setNegativeButton(R.string.cancel, new Dialog.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialogBuilder.setNegativeButton(R.string.cancel, new Dialog.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
for (long databaseIdLong : selectedBookmarksLongArray) {
// Get `databaseIdInt` for each selected bookmark.
int databaseIdInt = (int) databaseIdLong;
for (long databaseIdLong : selectedBookmarksLongArray) {
// Get `databaseIdInt` for each selected bookmark.
int databaseIdInt = (int) databaseIdLong;
exceptFolders = DatabaseUtils.sqlEscapeString(BookmarksActivity.currentFolder);
// If a folder is selected, add it and all children to the list of folders not to display.
exceptFolders = DatabaseUtils.sqlEscapeString(BookmarksActivity.currentFolder);
// If a folder is selected, add it and all children to the list of folders not to display.
for (long databaseIdLong : selectedBookmarksLongArray) {
// Get `databaseIdInt` for each selected bookmark.
int databaseIdInt = (int) databaseIdLong;
for (long databaseIdLong : selectedBookmarksLongArray) {
// Get `databaseIdInt` for each selected bookmark.
int databaseIdInt = (int) databaseIdLong;
// Get a `Cursor` will all the immediate subfolders.
Cursor subfoldersCursor = BookmarksActivity.bookmarksDatabaseHandler.getSubfoldersCursor(folderName);
// Get a `Cursor` will all the immediate subfolders.
Cursor subfoldersCursor = BookmarksActivity.bookmarksDatabaseHandler.getSubfoldersCursor(folderName);