Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #5406: Migrate keyboard hiding functionality #5463

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,8 @@ class StateFragmentPresenter @Inject constructor(
val inputManager: InputMethodManager =
activity.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
inputManager.hideSoftInputFromWindow(
fragment.view!!.windowToken,
@Suppress("DEPRECATION") // TODO(#5406): Use the correct constant value here.
InputMethodManager.SHOW_FORCED
fragment.requireView().windowToken,
0 // Flag value to force hide the keyboard when possible.
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,8 @@ class SurveyFragmentPresenter @Inject constructor(
val inputManager: InputMethodManager =
activity.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
inputManager.hideSoftInputFromWindow(
fragment.view!!.windowToken,
@Suppress("DEPRECATION") // TODO(#5406): Use the correct constant value here.
InputMethodManager.SHOW_FORCED
fragment.requireView().windowToken,
0 // Flag value to force hide the keyboard when possible.
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,8 @@ class QuestionPlayerFragmentPresenter @Inject constructor(
val inputManager: InputMethodManager =
activity.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
inputManager.hideSoftInputFromWindow(
fragment.view!!.windowToken,
@Suppress("DEPRECATION") // TODO(#5406): Use the correct constant value here.
InputMethodManager.SHOW_FORCED
fragment.requireView().windowToken,
0 // Flag value to force hide the keyboard when possible.
)
}

Expand Down
Loading