mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-04-07 20:19:40 +02:00
Merge pull request #437 from FossifyOrg/fix_search_dialog
Fix issue with physical keyboards in copy/move dialog
This commit is contained in:
commit
5d108af0e7
1 changed files with 6 additions and 3 deletions
|
@ -1,7 +1,8 @@
|
|||
package org.fossify.gallery.dialogs
|
||||
|
||||
import android.graphics.Color
|
||||
import android.view.KeyEvent
|
||||
import android.view.KeyEvent.ACTION_UP
|
||||
import android.view.KeyEvent.KEYCODE_BACK
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
|
@ -54,10 +55,12 @@ class PickDirectoryDialog(
|
|||
.setPositiveButton(org.fossify.commons.R.string.ok, null)
|
||||
.setNegativeButton(org.fossify.commons.R.string.cancel, null)
|
||||
.setOnKeyListener { dialogInterface, i, keyEvent ->
|
||||
if (keyEvent.action == KeyEvent.ACTION_UP && i == KeyEvent.KEYCODE_BACK) {
|
||||
return@setOnKeyListener if (keyEvent.action == ACTION_UP && i == KEYCODE_BACK) {
|
||||
backPressed()
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
if (showOtherFolderButton) {
|
||||
|
|
Loading…
Add table
Reference in a new issue