[TIMOB-11088] Android: Autolink tap area automatically takes the whole line space.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-02-26T06:31:04.000+0000 |
Affected Version/s | Release 2.1.2, Release 2.1.3 |
Fix Version/s | Release 3.0.2 |
Components | Android |
Labels | n/a |
Reporter | Amuktha Akkinepally |
Assignee | jithinpv |
Created | 2012-09-24T17:46:50.000+0000 |
Updated | 2017-03-20T20:47:47.000+0000 |
Description
When using long text for auto link, some of the text wraps in to a second line leaving a white area in the first line. Tapping on this white area opens the email client or the phone app. (The auto link behavior).
Steps to Reproduce:
1. Load a new project with the below app.js. 2. Click anywhere on the white space next to the link. Expected Behavior: The e-mail client or the Phone Dial pad should only open when the link is clicked. Actual Behavior: They open even when the blank space next to the link is tapped.
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var text = "1234@gmail.com 123456789012346789012345678901234567890 abc@gmail.com qrstuvwxyz123456789@abcdefghijk.com 123456789 123456789 123-456-7890"
var lbl2 = Ti.UI.createLabel({
text: text,
width:'auto',
top: 60,
autoLink: Ti.UI.Android.LINKIFY_ALL
});
win.add(lbl2);
win.open();
This seems to be normal Android behavior, I tested it with a native Java android application:
main.xml
HelloWorldActivity.java
Result, the same as in Titanium, taping on empty space triggers last link.
The issue reported here is not a bugg. Actually the 'lbl2' is a view and it's width will be set according to the length of the var 'text'. So the lbl2 should capture events on its entire area. When a user makes a click on the white space after the link, lbl2's event listener is getting triggered. Therefore it cannot be treated as a bug. For more clarification give a background color for lb2 and set its width to some dimension like 'width:300' and repeate the steps.
Closing ticket as invalid.