Enable Link Detection (iOS) and Link Clicking (iOS & Android)

This commit is contained in:
Nathanael Anderson
2015-09-07 14:07:00 -05:00
parent 0e61d1a120
commit 4ddd7f1a8a
2 changed files with 11 additions and 6 deletions

View File

@ -30,5 +30,7 @@ export class HtmlView extends common.HtmlView {
public _createUI() { public _createUI() {
this._android = new android.widget.TextView(this._context); this._android = new android.widget.TextView(this._context);
this._android.setAutoLinkMask(15); // 15 (0x0f) = Linkify All
} }
} }

View File

@ -27,21 +27,24 @@ function onHtmlPropertyChanged(data: dependencyObservable.PropertyChangeData) {
global.moduleMerge(common, exports); global.moduleMerge(common, exports);
export class HtmlView extends common.HtmlView { export class HtmlView extends common.HtmlView {
private _ios: UILabel; private _ios: UITextView;
constructor(options?: definition.Options) { constructor(options?: definition.Options) {
super(options); super(options);
this._ios = UITextView.new();
this._ios = new UILabel(); this._ios.scrollEnabled = false;
this._ios.editable = false;
this._ios.selectable = true;
this._ios.userInteractionEnabled = true; this._ios.userInteractionEnabled = true;
this._ios.numberOfLines = 0; 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; return this._ios;
} }
get _nativeView(): UILabel { get _nativeView(): UITextView {
return this._ios; return this._ios;
} }