nativescript

Nativescript RadListView not binding to source property

梦想的初衷 提交于 2020-01-07 03:00:34
问题 I am trying to implement {N} telerik's UI RadListView. Here is their getting started guide, which I followed as a reference. I have setup the following XML layout : list.xml <StackLayout loaded="loaded" xmlns:lv="nativescript-telerik-ui/listview" xmlns="http://www.nativescript.org/tns.xsd"> <lv:RadListView items="{{ rankingsArray }}"> <lv:RadListView.listViewLayout> <lv:ListViewLinearLayout scrollDirection="vertical"/> </lv:RadListView.listViewLayout> </lv:RadListView> <lv:RadListView

Nativescript pass fetch response data to a level text

时间秒杀一切 提交于 2020-01-06 15:59:29
问题 In my nativescript app,I am trying to bulid a level from the response of my API through fetch module.But I don't know how to bind the context in obserable.How to bind the context when page loaded.Here is my code- Response from my api- [{"value":"12000$"}] I want to get that value from response in {{price}} in my level text. view file- <Page loaded="loaded"> <GridLayout> <Label text="{{ price }}" horizontalAlignment="left" verticalAlignment="center" tap="model" /> </GridLayout> </Page> Fetch

Angular 5 and native IOS/Android communication

时光毁灭记忆、已成空白 提交于 2020-01-06 14:51:17
问题 we are building an angular application, which we will embed in an existing IOS and android application as a webview. I want to create a communication between angular application and native application. Eg: On certain events like download, angular UI should send some data to native apps to use default app behavior like that .. From the basic search i found that it can be done by using javascript. I want to know the best approach to do this(Architecture level), ie communication between angular

How to dynamically add view in page or layout

不问归期 提交于 2020-01-06 07:14:47
问题 I can't figure out how to programatically add a view into a layout or page. I need to add views at runtime without using static xml declaration since i need to fetch them from an http requested object... . I didn't find useful informations in the docs. Anyone knows how to do? 回答1: I think you meant to dynamically add some view / controls to the page rather than to navigate into another page. If so, you just need to add some controls into one of the layouts in your page (only containers [

× Component tns-core-modules is not installed. × Component tns-android is not installed. × Component tns-ios is not installed

强颜欢笑 提交于 2020-01-06 06:54:10
问题 What am I missing, I have completed all the steps asked in the installation guide of nativescript running tns doctor gives me the following output... C:\abc\xyz>tns doctor √ Getting environment information √ Your ANDROID_HOME environment variable is set and points to correct directory. √ Your adb from the Android SDK is correctly installed. √ The Android SDK is installed. √ A compatible Android SDK for compilation is found. √ Javac is installed and is configured properly. √ The Java

nativescript-background-http file uploading notifications

早过忘川 提交于 2020-01-06 05:59:17
问题 I upload files to server and get notifications on my android device What can I do to combine notifications into a stack? 回答1: The plugin uses android-upload-service library which is responsible for publishing notifications. The library assigns a Group for each notification so everything is stacked, but if you want to combine them with a summary then you must explicitly create a summary notification with same group so everything will be combined into one. This thread may show you how to create

Nativescript Code Behind - Add GridLayout to ScrollView Dynamically

北城以北 提交于 2020-01-06 05:17:47
问题 I am creating a dynamic GridLayout in Nativescript following the example on there page: https://docs.nativescript.org/ui/layouts/layout-containers It allows my to make a GridLayout using javascript, as I need it to be dynamic. However, I want to put this layout in a ScrollView. I believe I'm meant to do something like this const grid = new GridLayout(); const scroll = new ScrollView(); grid.addChild(); ... scroll.addView(grid); I constantly get an error saying "addView" is not a function. Is

Ng2-translate incompatible with webpack

本小妞迷上赌 提交于 2020-01-06 04:36:06
问题 Good morning guys. I'm using the ng2-translate plugin in my application, running tns run ios works perfectly. But when running with the command tns run ios --bundle --env.uglify --env.aot the webpack does the copying without giving any error, but the error app when opening: CONSOLE LOG file:///app/vendor.js:1:1200993: CONSOLE ERROR file:///app/vendor.js:1:28276: ERROR TypeError: this.http.get(this.prefix+"/"+e+this.suffix).map is not a function. (In 'this.http.get(this.prefix+"/"+e+this

Not able to get element's native view in NativeScript

流过昼夜 提交于 2020-01-05 06:28:10
问题 I am trying to change the width of some Switch elements in NativeScript with Angular because they are too small in my opinion. I have found that there is no way to do this through NativeScript's CSS subset so that means I have to make the change to the native object itself. To do this I have added a template reference variable to each one of the switches in my template like this: <Switch #switch checked="false"></Switch> Then in my class I try to access their android and nativeView properties

How to ignore accessibility fonts resize in NativeScript?

不打扰是莪最后的温柔 提交于 2020-01-05 05:32:46
问题 I'm using NativeScript with Angular. Is there an attribute to specify on Labels/buttons to ignore the font increase due to accessibility settings? I need a solution for both android and ios. Thank you! 回答1: If anybody interested, I found a workaround of using FormattedString for Labels, this object does not scale. 回答2: I just had a look a NativeScript own code and noticed this: https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/ui/text-base/text-base.android.ts#L216 You