- // Allow the `enter` key on the keyboard to create the bookmark from `create_bookmark_name_edittext`.
- createBookmarkNameEditText.setOnKeyListener((View view, int keyCode, KeyEvent event) -> {
- // If the event is a key-down on the `enter` key, select the `PositiveButton` `Create`.
- if ((keyCode == KeyEvent.KEYCODE_ENTER) && (event.getAction() == KeyEvent.ACTION_DOWN)) {
- // Trigger `createBookmarkListener` and return the `DialogFragment` to the parent activity.
+ // Allow the `enter` key on the keyboard to create the bookmark from the create bookmark name edittext`.
+ createBookmarkNameEditText.setOnKeyListener((View view, int keyCode, KeyEvent keyEvent) -> {
+ // If the event is a key-down on the `enter` key, select the create button.
+ if ((keyCode == KeyEvent.KEYCODE_ENTER) && (keyEvent.getAction() == KeyEvent.ACTION_DOWN)) {
+ // Trigger the create bookmark listener and return the dialog fragment and the favorite icon bitmap to the parent activity.