Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
fix(YouTube - Settings): Prevent autofocus on the search bar
Browse files Browse the repository at this point in the history
  • Loading branch information
anddea committed Sep 9, 2024
1 parent 4fba913 commit 08c3622
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,13 @@ private void setSearchView() {

// endregion

// Set the listener for query text changes
searchView.setOnQueryTextListener(onQueryTextListener);

// Clear focus on SearchView to prevent autofocus when returning to the activity
searchView.clearFocus();

// Keep a weak reference to the SearchView
searchViewRef = new WeakReference<>(searchView);
}
}

0 comments on commit 08c3622

Please sign in to comment.