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

fix(android): focus on TextInputEditText view #11277

Merged
merged 3 commits into from
Oct 14, 2019

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented Oct 11, 2019

  • Fix TiUIText from focusing on TextInputLayout instead of TiUIEditText on Android 8.0+
TEST CASE
const win = Ti.UI.createWindow({
    backgroundColor: 'gray',
    layout: 'vertical'
});

const txt_a = Ti.UI.createTextField({
    hintText: 'Text Field #1',
    width: '90%'
});
const txt_b = Ti.UI.createTextField({
    hintText: 'Text Field #2',
    width: '90%'
});
const txt_c = Ti.UI.createTextField({
    hintText: 'Text Field #3',
    width: '90%'
});

txt_a.addEventListener('return', _ => {
    Ti.API.info(`'return' event fired on 'Text Field #1'`);
    txt_c.focus();
    Ti.API.info(`Set focus to 'Text Field #3'`);
});

win.add([ txt_a, txt_b, txt_c ]);
win.open();
  1. Enter text into Text Field #1
  2. Press Enter
  3. Text Field #3 should focus and allow text entry

JIRA Ticket

if (model.toLowerCase().startsWith("droid")) {
useForce = true;
}
view.requestFocus();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Focus on TiUIEditText to show keyboard.

@build build added this to the 8.3.0 milestone Oct 11, 2019
@build
Copy link
Contributor

build commented Oct 11, 2019

Messages
📖 👍 Hey!, You deleted more code than you added. That's awesome!
📖

💾 Here's the generated SDK zipfile.

📖

✅ All tests are passing
Nice one! All 4040 tests are passing.
(There are 469 skipped tests not included in that total)

📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.

Generated by 🚫 dangerJS against a4b2f3e

Copy link
Contributor

@jquick-axway jquick-axway left a comment

Choose a reason for hiding this comment

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

CR: Pass

@lokeshchdhry
Copy link
Contributor

FR Passed.

TextInputEditText view gains focus & text can be added to it.

Studio Ver: 5.1.4.201909061933
SDK Ver: 8.3.0 local build
OS Ver: 10.14.5
Xcode Ver: Xcode 11.1
Appc NPM: 4.2.15
Appc CLI: 7.1.1
Daemon Ver: 1.1.3
Ti CLI Ver: 5.2.1
Alloy Ver: 1.14.1
Node Ver: 10.16.1
NPM Ver: 6.9.0
Java Ver: 10.0.2
Android Devices: ⇨ google Pixel (Android 9)
Android Emulator: ⇨ Android 8.1.0, Android 9.0, Android 4.4

@lokeshchdhry lokeshchdhry merged commit 8192ea2 into tidev:master Oct 14, 2019
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