Hide soft keyboard when transfer dialog is cancelled or dismissed
This commit is contained in:
@@ -1071,6 +1071,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
with(builder) {
|
with(builder) {
|
||||||
setView(layout)
|
setView(layout)
|
||||||
setPositiveButton(R.string.transfer) { dialog, _ ->
|
setPositiveButton(R.string.transfer) { dialog, _ ->
|
||||||
|
imm.hideSoftInputFromWindow(transferUri.windowToken, 0)
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
val uriText = transferUri.text.toString().trim()
|
val uriText = transferUri.text.toString().trim()
|
||||||
if (uriText.isNotEmpty()) {
|
if (uriText.isNotEmpty()) {
|
||||||
@@ -1095,6 +1096,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
setNegativeButton(android.R.string.cancel) { dialog, _ ->
|
setNegativeButton(android.R.string.cancel) { dialog, _ ->
|
||||||
|
imm.hideSoftInputFromWindow(transferUri.windowToken, 0)
|
||||||
dialog.cancel()
|
dialog.cancel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user