import android.content.DialogInterface;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.content.DialogInterface;
import android.database.Cursor;
import android.graphics.Bitmap;
public class EditBookmarkFolder extends DialogFragment {
// The public interface is used to send information back to the parent activity.
public interface EditBookmarkFolderListener {
public class EditBookmarkFolder extends DialogFragment {
// The public interface is used to send information back to the parent activity.
public interface EditBookmarkFolderListener {
void onSaveEditBookmarkFolder(DialogFragment dialogFragment);
}
// `editFolderListener` is used in `onAttach()` and `onCreateDialog`.
private EditBookmarkFolderListener editBookmarkFolderListener;
void onSaveEditBookmarkFolder(DialogFragment dialogFragment);
}
// `editFolderListener` is used in `onAttach()` and `onCreateDialog`.
private EditBookmarkFolderListener editBookmarkFolderListener;
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Get a long array with the the databaseId of the selected bookmark and convert it to an `int`.
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Get a long array with the the databaseId of the selected bookmark and convert it to an `int`.
int selectedBookmarkDatabaseId = (int) selectedBookmarkLongArray[0];
// Get a `Cursor` with the specified bookmark and move it to the first position.
int selectedBookmarkDatabaseId = (int) selectedBookmarkLongArray[0];
// Get a `Cursor` with the specified bookmark and move it to the first position.
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) {
// Create an `AlertDialog` from the `AlertDialog.Builder`.
final AlertDialog alertDialog = dialogBuilder.create();
// Create an `AlertDialog` from the `AlertDialog.Builder`.
final AlertDialog alertDialog = dialogBuilder.create();
// Show the keyboard when the `Dialog` is displayed on the screen.
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
// Show the keyboard when the `Dialog` is displayed on the screen.
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);