mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-22 16:07: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)
|
setContentView(R.layout.activity_display_name)
|
||||||
displayNameEditText.imeOptions = displayNameEditText.imeOptions or 16777216 // Always use incognito keyboard
|
displayNameEditText.imeOptions = displayNameEditText.imeOptions or 16777216 // Always use incognito keyboard
|
||||||
displayNameEditText.setOnEditorActionListener(
|
displayNameEditText.setOnEditorActionListener(
|
||||||
OnEditorActionListener { _, actionId, event ->
|
OnEditorActionListener { _, actionID, event ->
|
||||||
// Handle validation from keyboard to trigger registration
|
if (actionID == EditorInfo.IME_ACTION_SEARCH ||
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH ||
|
actionID == EditorInfo.IME_ACTION_DONE ||
|
||||||
actionId == EditorInfo.IME_ACTION_DONE ||
|
(event.action == KeyEvent.ACTION_DOWN &&
|
||||||
(event.action === KeyEvent.ACTION_DOWN
|
event.keyCode == KeyEvent.KEYCODE_ENTER)) {
|
||||||
&& event.keyCode === KeyEvent.KEYCODE_ENTER)) {
|
this.register()
|
||||||
this.register();
|
|
||||||
return@OnEditorActionListener true
|
return@OnEditorActionListener true
|
||||||
}
|
}
|
||||||
// Return true if you have consumed the action, else false.
|
|
||||||
false
|
false
|
||||||
})
|
})
|
||||||
registerButton.setOnClickListener { register() }
|
registerButton.setOnClickListener { register() }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user