I have been following the official Android tutorials and somehow am having a problem with this very simple example to execute a function after pressing \"Enter\" for an Edit
Delete the import statement that has DialogInterface, then import the View.OnKeyListener.
DialogInterface
View.OnKeyListener