public class CreateHomeScreenShortcut extends DialogFragment {
// The public interface is used to send information back to the parent activity.
public interface CreateHomeScreenSchortcutListener {
public class CreateHomeScreenShortcut extends DialogFragment {
// The public interface is used to send information back to the parent activity.
public interface CreateHomeScreenSchortcutListener {
private CreateHomeScreenSchortcutListener createHomeScreenShortcutListener;
// Check to make sure that the parent activity implements the listener.
private CreateHomeScreenSchortcutListener createHomeScreenShortcutListener;
// Check to make sure that the parent activity implements the listener.
dialogBuilder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialogBuilder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// 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);