xiezefan / android-test-kit

Automatically exported from code.google.com/p/android-test-kit
1 stars 0 forks source link

TextField in Dialogs gives view not found on API 15/16 physical devices #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  create a dialog with a text field that gets focus as soon as the dialog 
shows
2. Try to type into the text box using a viewAction

What is the expected output? What do you see instead?

- Should work on all devices and APIs.
- Works everywhere except API 15 and 16 PHYSICAL devices. 
- on API 15 and 16 PHYSICAL devices, you need a sleep before performing the 
action... 

What version of the product are you using? On what operating system?

espresso 1.1 ( double espresso )

Original issue reported on code.google.com by YogurtE...@gmail.com on 10 Jul 2014 at 7:26

GoogleCodeExporter commented 9 years ago
Not sure if it is related but we are showing the soft keyboard when the dialog 
pops up.

dialog.setOnShowListener(new DialogInterface.OnShowListener() {
            @Override public void onShow(final DialogInterface dialog) {
             view.requestFocus();
             inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED,

If I use "typeTextIntoFocusedView" that seems to solve the problem, so maybe it 
is an issue with the field being already focused. 

Original comment by YogurtE...@gmail.com on 10 Jul 2014 at 10:14

GoogleCodeExporter commented 9 years ago
So... problem solved? :)

Original comment by vale...@google.com on 19 Nov 2014 at 10:24