mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fixed HtmlView
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
import { HtmlView as HtmlViewDefinition } from "ui/html-view";
|
||||
import { View, Property } from "ui/core/view";
|
||||
import {
|
||||
HtmlViewBase, htmlProperty
|
||||
} from "./html-view-common";
|
||||
|
||||
export * from "ui/core/view";
|
||||
export * from "./html-view-common";
|
||||
|
||||
export class HtmlView extends View implements HtmlViewDefinition {
|
||||
export class HtmlView extends HtmlViewBase {
|
||||
private _android: android.widget.TextView;
|
||||
|
||||
get android(): android.widget.TextView {
|
||||
return this._android;
|
||||
}
|
||||
|
||||
public html: string;
|
||||
|
||||
public _createUI() {
|
||||
this._android = new android.widget.TextView(this._context);
|
||||
// This makes the html <a href...> work
|
||||
@@ -33,8 +32,4 @@ export class HtmlView extends View implements HtmlViewDefinition {
|
||||
this._android.setAutoLinkMask(mask);
|
||||
this._android.setText(<any>android.text.Html.fromHtml(value));
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Can we use Label.ios optimization for affectsLayout???
|
||||
export const htmlProperty = new Property<HtmlView, string>({ name: "html", defaultValue: "", affectsLayout: true });
|
||||
htmlProperty.register(HtmlView);
|
||||
}
|
||||
Reference in New Issue
Block a user