Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7_1_X][TIMOB-25671]Android : TextField's some returnKeyType values not firing 'return' event #9943

Merged
merged 6 commits into from Mar 26, 2018

Conversation

ypbnv
Copy link
Contributor

@ypbnv ypbnv commented Mar 19, 2018

JIRA: https://jira.appcelerator.org/browse/TIMOB-25671

Description:
Backport of: #9933
With updated docs.

Add return event property for distinguishing the origin of the event.
@build
Copy link
Contributor

build commented Mar 19, 2018

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

//Refer to TiUIText.handleReturnKeyType(int) for a list of return keys that are mapped to EditorInfo.IME_ACTION_NEXT and EditorInfo.IME_ACTION_DONE.
if (actionId == EditorInfo.IME_ACTION_NEXT || actionId == EditorInfo.IME_ACTION_DONE) {
data.put(TiC.PROPERTY_BUTTON, RETURN_KEY_TYPE_ACTION);
// Check whether we a dealing with text area or text field. Multiline TextViews in Landscape
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"we are dealing"

description: |
Since in Landscape mode Android provides both the New Line and the Action type
buttons as return keys the 'button' property in the event is used to distinguish from
which key has the event been fired.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Android provides both the new line- and the action buttons as return keys in landscape mode, the button property in the event is used to distinguish from which key the event has been fired.

In general: I think @jquick-axway can give some language advices here as well.

properties:
- name: value
summary: Value of this text area.
type: String
- name: button
summary: Constant indication whether the event is from New line or Action key.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constant indicating whether the event is from a new line- or action key.

@@ -2720,6 +2720,20 @@ properties:
since: "3.0.0"
permission: read-only

- name: RETURN_KEY_TYPE_ACTION
summary: The returnKeyEvent has been send by the Action button on the software keyboard.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return event has been sent by the action button on the software keyboard.

permission: read-only

- name: RETURN_KEY_TYPE_CARTRIDGE_RETURN
summary: The returnKeyEvent has been send by the New Line\Cartridge Return button on the software keyboard.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return evtn has been sent by the new line- or cartridge return button on the software keyboard.

@ypbnv
Copy link
Contributor Author

ypbnv commented Mar 19, 2018

@hansemannn Updated the wording and mistakes. BTW why the '-' after 'new line'?

@lokeshchdhry
Copy link
Contributor

FR Passed.

return event is successfully fired for all returnKeyType.

Studio Ver: 5.1.0
SDK Ver: 7.1.1.GA
OS Ver: 10.13.2
Xcode Ver: Xcode 9.2
Appc NPM: 4.2.12
Appc CLI: 7.0.2
Daemon Ver: 1.0.1
Ti CLI Ver: 5.0.14
Alloy Ver: 1.11.0
Node Ver: 8.9.1
NPM Ver: 5.5.1
Java Ver: 1.8.0_131
Devices: ⇨ google Nexus 5 --- Android 6.0.1
⇨ google Nexus 6P --- Android 8.0.0

@lokeshchdhry
Copy link
Contributor

Waiting for CR to pass.

@build build added the android label Mar 26, 2018
@lokeshchdhry lokeshchdhry merged commit b581b20 into tidev:7_1_X Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants