https://github.com/nericode/nativescript-text-justify
https://github.com/nericode/nativescript-text-justify
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/nericode/nativescript-text-justify
- Owner: nericode
- Created: 2019-02-05T06:22:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T16:43:53.000Z (over 3 years ago)
- Last Synced: 2025-02-15T03:41:57.118Z (over 1 year ago)
- Language: TypeScript
- Size: 118 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Text Justify  
## Installation
Ideally it would be something like:
```javascript
tns plugin add nativescript-text-justify
```
## Usage
### Only Android
To establish a font type, it is necessary to create a directory `assets > fonts` with the fonts to be used:
Directory:
`App_Resources > Android > src > main > assets > fonts > .ttf`
Show demo for more info.
```xml
```
## Angular
Add element in `app.module.ts`:
```ts
import { registerElement } from "nativescript-angular/element-registry";
import { TextJustify } from "nativescript-text-justify";
registerElement("TextJustify", () => TextJustify);
```
In .html:
```html
```
## API
| Property (Android) | Default | Description |
| ------------------ | ------------------------ | --------------------------------------------- |
| text | text: string | Set the text |
| alignment | alignment: boolean | Set true for justified or false |
| textSize | textSize: number | Set textSize 1 and <= 23 |
| textColor | textColor: string | Set textColor #RRGGBB 'white', 'black', etc.. |
| textTypefacePath | textTypefacePath: string | Set textTypefacePath example: roboto.ttf |
| Property (iOS) | Default | Description |
| -------------- | ------------------ | --------------------------------------------- |
| text | text: string | Set the text |
| alignment | alignment: boolean | Set true for justified or false |
| color | color: string | Set textColor #RRGGBB 'white', 'black', etc.. |
| textWrap | textWrap: boolean | Property of Label |
| fontSize | fontSize: number | Property of Label |
## License
Apache License Version 2.0, January 2004