- // Allow the enter key on the keyboard to create the folder from `create_folder_name_edittext`.
- folderNameEditText.setOnKeyListener((View v, int keyCode, KeyEvent event) -> {
- // If the event is a key-down on the `enter` key, select the `PositiveButton` `Create`.
- if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER) && createButton.isEnabled()) { // The enter key was pressed and the create button is enabled.
- // Trigger `createBookmarkFolderListener` and return the `DialogFragment` to the parent activity.
+ // Set the enter key on the keyboard to create the folder from the edit text.
+ folderNameEditText.setOnKeyListener((View view, int keyCode, KeyEvent keyEvent) -> {
+ // If the key event is a key-down on the `enter` key create the bookmark folder.
+ if ((keyEvent.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER) && createButton.isEnabled()) { // The enter key was pressed and the create button is enabled.
+ // Trigger the create bookmark folder listener and return the dialog fragment to the parent activity.