mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-02 03:40:16 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/21744: Replace InputMethodManager's deprecated toggleSoftInput.
This commit is contained in:
parent
e297e494c2
commit
de520bc77a
@ -465,8 +465,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
|
||||
if (!dialogHandledAction) {
|
||||
val imm =
|
||||
requireContext().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
@Suppress("DEPRECATION")
|
||||
imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0)
|
||||
imm.hideSoftInputFromWindow(view?.windowToken, InputMethodManager.HIDE_IMPLICIT_ONLY)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,8 +110,7 @@ class AddLoginFragment : Fragment(R.layout.fragment_add_login) {
|
||||
binding.hostnameText.requestFocus()
|
||||
val imm =
|
||||
requireContext().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
@Suppress("DEPRECATION")
|
||||
imm.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, 0)
|
||||
imm.showSoftInput(binding.hostnameText, InputMethodManager.SHOW_IMPLICIT)
|
||||
|
||||
binding.clearHostnameTextButton.setOnClickListener {
|
||||
binding.hostnameText.text?.clear()
|
||||
|
Loading…
Reference in New Issue
Block a user