mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-22 07:57:30 +00:00
Clean
This commit is contained in:
parent
18b95c7f8a
commit
0e95c8cec3
@ -23,16 +23,14 @@ class DisplayNameActivity : BaseActionBarActivity() {
|
||||
setContentView(R.layout.activity_display_name)
|
||||
displayNameEditText.imeOptions = displayNameEditText.imeOptions or 16777216 // Always use incognito keyboard
|
||||
displayNameEditText.setOnEditorActionListener(
|
||||
OnEditorActionListener { _, actionId, event ->
|
||||
// Handle validation from keyboard to trigger registration
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH ||
|
||||
actionId == EditorInfo.IME_ACTION_DONE ||
|
||||
(event.action === KeyEvent.ACTION_DOWN
|
||||
&& event.keyCode === KeyEvent.KEYCODE_ENTER)) {
|
||||
this.register();
|
||||
OnEditorActionListener { _, actionID, event ->
|
||||
if (actionID == EditorInfo.IME_ACTION_SEARCH ||
|
||||
actionID == EditorInfo.IME_ACTION_DONE ||
|
||||
(event.action == KeyEvent.ACTION_DOWN &&
|
||||
event.keyCode == KeyEvent.KEYCODE_ENTER)) {
|
||||
this.register()
|
||||
return@OnEditorActionListener true
|
||||
}
|
||||
// Return true if you have consumed the action, else false.
|
||||
false
|
||||
})
|
||||
registerButton.setOnClickListener { register() }
|
||||
|
Loading…
x
Reference in New Issue
Block a user