[TIMOB-9517] Android: Enable autoLink in TextView
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-08-16T01:56:25.000+0000 |
| Affected Version/s | Release 2.0.2 |
| Fix Version/s | Sprint 2012-13 API, Release 3.0.0 |
| Components | Android |
| Labels | api, module_textarea, qe-review, qe-testadded |
| Reporter | Sandeep Bhimavarapu |
| Assignee | Hieu Pham |
| Created | 2012-06-13T11:23:29.000+0000 |
| Updated | 2012-10-24T21:29:28.000+0000 |
Description
This feature request is to enable autoLink in TextView for Android.
The required documentation is here at
http://developer.android.com/reference/android/widget/TextView.html#setAutoLinkMask(int)
{panel:title=Test Case}
var win = Ti.UI.createWindow({
backgroundColor : "white"
});
var ta = Ti.UI.createTextArea({
left:5, top: 5, right: 5, height: 180,
editable: false, // this needs to be set to false, otherwise data detection type will fail
backgroundColor:'#ccc',
value:'Contact\n test@test.com\n 817-555-5555\n http://bit.ly\n 444 Castro Street, Mountain View, CA'
});
win.add(ta);
win.open();
For the test case, you need to specify the autoLink value:
PR for this: https://github.com/appcelerator/titanium_mobile/pull/2474var win = Ti.UI.createWindow({ backgroundColor : "white" }); var ta = Ti.UI.createTextArea({ left:5, top: 5, right: 5, height: 180, editable: false, // this needs to be set to false, otherwise data detection type will fail backgroundColor:'#ccc', autoLink: Titanium.UI.Android.LINKIFY_ALL, value:'Contact\n test@test.com\n 817-555-5555\n http://bit.ly\n 444 Castro Street, Mountain View, CA' }); win.add(ta); win.open();Environment used for verification - Tested with Titanium SDK: 2.2.0.v20120815194913 Tested with Titanium Studio: 2.1.1.201207271312 Device - Samsung GALAXY Note Android 2.3.6 Machine OS - MAC 10.7.3
Re-opening to edit label