1.0.41 • Published 4 years ago

nativescript-htmllabel v1.0.41

Weekly downloads
17
License
Apache-2.0
Repository
-
Last release
4 years ago

NativeScript Label widget

npm downloads npm downloads npm

A NativeScript Label widget. It is a direct replacement for the {N} Label widget.

Installation

Run the following command from the root of your project:

tns plugin add nativescript-htmllabel

This command automatically installs the necessary files, as well as stores nativescript-htmllabel as a dependency in your project's package.json file.

Configuration

It works exactly the same way as the {N} plugin. However it adds a few improvements

iOS Performances

On iOS generating html string can be slow using the system way. You can enable DTCoreText to make it faster.

  • add pod DTCoreText in your app Podfile at App_Resources/ios
pod 'DTCoreText'
  • enable it in your app.(js|ts) (as soon as possible)
require('nativescript-htmlabel').enableIOSDTCoreText();

Properties

  • html
    Html text that will be used to render text. HTML supported tags are a bit different on iOS and Android. To make sure it works as expected, for now only used Android supported ones

  • verticalTextAlignment
    You can also set it through css with vertical-text-alignment

  • textShadow
    You can also set it through css with text-shadow. The format is offsetx offsety blurradius color

Improvements

  • Override the {N} font loading system to make it much faster
  • faster creation of FormattedString
  • faster label creation and drawing, especially on android
1.0.41

4 years ago

1.0.40

4 years ago

1.0.39

4 years ago

1.0.38

4 years ago

1.0.37

4 years ago

1.0.33

4 years ago

1.0.36

4 years ago

1.0.35

4 years ago

1.0.34

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago