[TIMOB-8729] Android: TextField: Text is not visible, and view appears to redraw before keyboard is displayed
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2019-05-21T10:44:46.000+0000 |
Affected Version/s | Release 2.0.1, Release 3.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | api, qe-and040912 |
Reporter | Sitara Shylaja |
Assignee | Maggie Chen |
Created | 2012-04-13T16:40:23.000+0000 |
Updated | 2019-05-21T10:44:46.000+0000 |
Description
In TextField cannot see any texts that is being typed in and the cursor blinks outside the text field. For a second previous view is shown
Steps to reproduce
1:Install and run the app
2: Tap inside the text field
3:type in word
var window = Ti.UI.createWindow({
backgroundColor: 'blue'
});
var textField = Ti.UI.createTextField({
backgroundColor: '#fff',
height: 30,
top: 20,
left: 20,
right: 20
});
window.add(textField);
window.open();
Actual result: Could not see the text typed in,on focus the window returns to the previous view for a second.
Expected result:should be able to see the text and the cursor should blink inside the text field
*Note : this is not a regression bug,it goes back to 1.8.2*
Issue is reproduced with sdk versions 3.0.2 and 3.1.0. Note: if height of the textfield is set to 'auto' or some dimension like 100(much greater than 30) it works fine.
Issue is reproduced with sdk versions 3.0.2 and 3.1.0. Note: if height of the textfield is set to 'auto' or some dimension like 100(much greater than 30) it works fine.
SDK 3.2.0 still have the bug. The solution from jithinpv seems like a good workaround though. (height: 'auto')
It is recommended to use the default font size of the system and let the TextField auto-size its height to fit (by default, height of the TextField is Ti.UI.SIZE). Please try to avoid hard coding the height of TextField and specify the text color in order to be visible.
Please take note TextField Cursor is not visible on certain previous Android API levels as the native Android behaviour. Will open a separate ticket for the cursor issue.
Closing ticket, not able to reproduce using the instructions mentioned above. (Added colour property and setting the height to Ti.UI.SIZE adjusts its height according to the fontSize property if specified. *Test Environment*