Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
refactor: Persist the search query foucs
Browse files Browse the repository at this point in the history
Fixes: LEARNER-9461
  • Loading branch information
HamzaIsrar12 committed Aug 7, 2023
1 parent 1621295 commit fd32fa4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ protected void onRestoreInstanceState(Bundle savedInstanceState) {
String queryString = savedInstanceState.getString(QUERY_PARAM, "");
binding.svSearchCourses.setQuery(queryString, false);
if (savedInstanceState.getBoolean(FOCUSED_VIEW, false)) {
binding.svSearchCourses.postDelayed(() -> binding.svSearchCourses.requestFocus(), 100);
binding.svSearchCourses.postDelayed(() -> {
binding.svSearchCourses.requestFocus();
SoftKeyboardUtil.hide(this);
}, 1000);
}
}

Expand Down

0 comments on commit fd32fa4

Please sign in to comment.