Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9517] Android: Enable autoLink in TextView

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-08-16T01:56:25.000+0000
Affected Version/sRelease 2.0.2
Fix Version/sSprint 2012-13 API, Release 3.0.0
ComponentsAndroid
Labelsapi, module_textarea, qe-review, qe-testadded
ReporterSandeep Bhimavarapu
AssigneeHieu Pham
Created2012-06-13T11:23:29.000+0000
Updated2012-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();

Comments

  1. Allen Yeung 2012-06-29

    For the test case, you need to specify the autoLink value:
       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',
           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();
       
    PR for this: https://github.com/appcelerator/titanium_mobile/pull/2474
  2. Shyam Bhadauria 2012-08-16

    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
  3. Shyam Bhadauria 2012-08-16

    Re-opening to edit label

JSON Source