Skip to content

Commit

Permalink
Open the 1st search result on Enter
Browse files Browse the repository at this point in the history
  • Loading branch information
falzonv committed Mar 30, 2022
1 parent 393e145 commit de25911
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,9 @@ public boolean onEditorAction(TextView view, int actionId, KeyEvent event)
// Perform an action when the user presses "Enter"
if(actionId == EditorInfo.IME_ACTION_SEARCH)
{
// If there is only one application remaining, start it
if(adapter.getItemCount() == 1)
{
adapter.getFirstItem().start(view) ;
return true ;
}
// Launch the first app displayed in the results
adapter.getFirstItem().start(view) ;
return true ;
}
return false ;
}
Expand Down

0 comments on commit de25911

Please sign in to comment.