Humberto Active Member Licensed User Longtime User Jun 9, 2016 #1 In android Erel post a code that the text in a label became a link that the OS take action. SO if it is a mail, or http or a phone number. B4X: xlbl_5.Text = "0" & xx.Trim args(0) = xlbl_5 'Label1 types(0) = "android.widget.TextView" args(1) = 15 types(1) = "java.lang.int" Obj1.RunMethod4("addLinks", args, types) There is a equivalnt for IOS ?
In android Erel post a code that the text in a label became a link that the OS take action. SO if it is a mail, or http or a phone number. B4X: xlbl_5.Text = "0" & xx.Trim args(0) = xlbl_5 'Label1 types(0) = "android.widget.TextView" args(1) = 15 types(1) = "java.lang.int" Obj1.RunMethod4("addLinks", args, types) There is a equivalnt for IOS ?
Erel B4X founder Staff member Licensed User Longtime User Jun 10, 2016 #2 You can use this code with a TextView: B4X: Sub Linkify(tv As TextView) Dim no As NativeObject = tv no.SetField("editable", False) no.SetField("dataDetectorTypes", 0xffffffff) End Sub The TextView will not be editable. Upvote 0
You can use this code with a TextView: B4X: Sub Linkify(tv As TextView) Dim no As NativeObject = tv no.SetField("editable", False) no.SetField("dataDetectorTypes", 0xffffffff) End Sub The TextView will not be editable.
Humberto Active Member Licensed User Longtime User Jun 10, 2016 #3 Works perfect Thanks again Upvote 0