jenspfahl / ANOTHERpass

Another approach of a password manager
https://anotherpass.jepfa.de
GNU General Public License v3.0
58 stars 3 forks source link

Create label if focus lost on label edit text #6

Closed jenspfahl closed 2 years ago

jenspfahl commented 2 years ago

When typing a new label without pressing space but leaving the text field to proceed, the label will not be created. Adding a FocusChangedListener would help but doesn't work since the underlying EditText is encapsulated by the Chip-framework. See EditCredentialDataFragment.kt:114 (TODO)

/*
        TODO doesn't work since editCredentialLabelsView.editText return a new ChipsInputEditText ll the time.
         The origin is encapsulated in ChipsAdapter which is encapsulated in ChipsInput.
         Need to fork that lib and change it,
        editCredentialLabelsView.editText.setOnFocusChangeListener { view, focusGained ->
            if (!focusGained) {
                addLabel(editCredentialLabelsView.editText.editableText.toString(), editCredentialActivity)
            }
        }*/
jenspfahl commented 2 years ago

Implemented with latest changes.