mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
Enable Link Detection (iOS) and Link Clicking (iOS & Android)
This commit is contained in:
@ -30,5 +30,7 @@ export class HtmlView extends common.HtmlView {
|
||||
|
||||
public _createUI() {
|
||||
this._android = new android.widget.TextView(this._context);
|
||||
this._android.setAutoLinkMask(15); // 15 (0x0f) = Linkify All
|
||||
}
|
||||
|
||||
}
|
@ -27,21 +27,24 @@ function onHtmlPropertyChanged(data: dependencyObservable.PropertyChangeData) {
|
||||
global.moduleMerge(common, exports);
|
||||
|
||||
export class HtmlView extends common.HtmlView {
|
||||
private _ios: UILabel;
|
||||
private _ios: UITextView;
|
||||
|
||||
constructor(options?: definition.Options) {
|
||||
super(options);
|
||||
this._ios = UITextView.new();
|
||||
|
||||
this._ios = new UILabel();
|
||||
this._ios.userInteractionEnabled = true;
|
||||
this._ios.numberOfLines = 0;
|
||||
this._ios.scrollEnabled = false;
|
||||
this._ios.editable = false;
|
||||
this._ios.selectable = true;
|
||||
this._ios.userInteractionEnabled = true;
|
||||
this._ios.dataDetectorTypes = 255; // Future Proof this; valid max in iOS is currently 15; however ALL = MAX UNSIGNED INT which isn't valid in JavaScript
|
||||
}
|
||||
|
||||
get ios(): UILabel {
|
||||
get ios(): UITextView {
|
||||
return this._ios;
|
||||
}
|
||||
|
||||
get _nativeView(): UILabel {
|
||||
get _nativeView(): UITextView {
|
||||
return this._ios;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user