nativescript

nativescript ios app crashes - attempting to change the getter of an unconfigurable property

自作多情 提交于 2021-01-02 17:50:21
问题 I created a directive to disable the context menu on android and ios app in Nativescript. import { Directive, OnInit, OnDestroy, ElementRef, Renderer2 } from "@angular/core"; import { isIOS } from "tns-core-modules/platform"; import * as utils from "tns-core-modules/utils/utils"; import { EventData } from "tns-core-modules/data/observable"; import { TextField } from "tns-core-modules/ui/text-field"; declare var UITextField, CGRectMake, android; if (isIOS) { UITextField.prototype.

nativescript ios app crashes - attempting to change the getter of an unconfigurable property

穿精又带淫゛_ 提交于 2021-01-02 17:36:55
问题 I created a directive to disable the context menu on android and ios app in Nativescript. import { Directive, OnInit, OnDestroy, ElementRef, Renderer2 } from "@angular/core"; import { isIOS } from "tns-core-modules/platform"; import * as utils from "tns-core-modules/utils/utils"; import { EventData } from "tns-core-modules/data/observable"; import { TextField } from "tns-core-modules/ui/text-field"; declare var UITextField, CGRectMake, android; if (isIOS) { UITextField.prototype.

nativescript ios app crashes - attempting to change the getter of an unconfigurable property

廉价感情. 提交于 2021-01-02 17:35:27
问题 I created a directive to disable the context menu on android and ios app in Nativescript. import { Directive, OnInit, OnDestroy, ElementRef, Renderer2 } from "@angular/core"; import { isIOS } from "tns-core-modules/platform"; import * as utils from "tns-core-modules/utils/utils"; import { EventData } from "tns-core-modules/data/observable"; import { TextField } from "tns-core-modules/ui/text-field"; declare var UITextField, CGRectMake, android; if (isIOS) { UITextField.prototype.

Can I “force” the Android Simulator to always use the same port?

◇◆丶佛笑我妖孽 提交于 2021-01-01 08:50:23
问题 I am trying to do NativeScript development on an Azure virtual box. The installation of the NativeScript development environment has been completed successfully, as I do not have any issues when I am running the >tns doctor command: Once I try to run my application: >tns run android --bundle I see that it is successfully installed on the device identified as 'emulator-5554' but then this error pops up: Unable to apply changes on device: emulator-5554. Error is: connect ECONNREFUSED 127.0.0.1

NativeScript RTL support

假装没事ソ 提交于 2020-12-12 01:48:26
问题 My app can have only one language, and it should be aligned RTL. Currently when I run my app with tns preview the ActionBar labels appears in the left (instead of the right) and so on with any other widget. I have found some localization plugins but not sure I need them for my case - since I have only one language and text direction. I have been through all GitHub issues related to RTL but I'm still not sure how to work it out. Any idea how I can force my app and change the layout for RTL

How disable screenshots in Nativescript mobile application?

荒凉一梦 提交于 2020-12-07 06:48:49
问题 In native Android application for disabling screenshors need to add code getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE); but how use this security option in NativeScript application? 回答1: This solution is done in Nativescript-Vue, please adjust it according to the varient of Nativescript you use. Import these : import { isAndroid, isIOS, device, screen} from "tns-core-modules/platform"; const app = require("tns-core-modules/application"); Add a pageLoad function to