nativescript

NativeScript Keyboard for Negative Number Input Field

*爱你&永不变心* 提交于 2019-12-25 07:35:17
问题 I am using Nativescript to create an Android and iOS App. As it is a kind of a calculator there are a lot of input fields for numbers. The numbers are decimal and can be negative. So I need a Keyboard with numbers, decimal point and minus sign (dash). Therefore I use the keyboard type "number" : The keyboard that opens up in Android is fine. But the one in iOS has a lot of unnecessary fields like "(". iOS KeyBoard As i found out there is no keyboard in iOS with the fields that I want: https:/

How to get reference to self.view and self.view.frame in NativeScript

為{幸葍}努か 提交于 2019-12-25 06:59:38
问题 I am trying to call the UIPrinterPickerController in NativeScript on an iPad. I've tracked down the call that I need to make and it is here: UIPrinterPickerController.presentFromRectInViewAnimatedCompletionHandler(rect: CGRect, view: UIView, animated: boolean, completion: (arg1: UIPrinterPickerController, arg2: boolean, arg3: NSError) => void): boolean; In the examples I've seen the rect param is a reference to self.view.frame and the view param is a reference to self.view . How do I find

iOS plist.info: where should I put additional keys with a nested dict tag?

我怕爱的太早我们不能终老 提交于 2019-12-25 05:09:47
问题 In my Nativescript app (compiles to Native including plist.info file) I'm trying to add a key to plist.info to solve iOS 9 transport security issues. The solution I'm trying to apply comes from https://blog.nraboy.com/2015/12/fix-ios-9-app-transport-security-issues-in-nativescript/ Specifically it's about adding the following key to plist.info file: <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true /> </dict> However during building process I get the following

Cannot save file with path

不问归期 提交于 2019-12-25 05:08:12
问题 I am using the httpModule to call a dropbox rest service to download a text file. When I download it to internal storage it seems happy but then I cannot open the text file with the default app. So now I am pointing the download location to the external storage, but I am getting an error 'Error: Cannot save file with path: /storage/emulated/0/myNewDir'. I have added thee write_external_storage and read_external_storage permissions to the manifest. Here is my code: HomePage.prototype.getFile =

Renaming NativeScript iOS Application

柔情痞子 提交于 2019-12-25 05:07:21
问题 I need to rename my application and I'm not sure where to start. I tried manually changing the names of a few folders/files, but everything broke, I think because there were way more things using the original name than I had anticipated. I checked out the following post, but it is unfortunately for Android (I am building an iOS application). Renaming app name 回答1: I went through the same thing recently. It was a frustrating process! I will try to remember everywhere I had to do it. Change the

NativeScript Angular 2 disable swipe back on ios

╄→гoц情女王★ 提交于 2019-12-25 04:26:36
问题 does anyone know how to disable the back swipe after navigating to a new page? I read this: http://docs.nativescript.org/angular/core-concepts/angular-navigation#clearing-page-navigation-history Clearing Page Navigation History In NativeScript's page navigation, you have the option to navigate to another page and clear the page navigation history. This means that the user will not be able to go back using the back button (or swipe back in iOS). This is useful in scenarios where you have a

Nativescript and ListView, item undefined

只谈情不闲聊 提交于 2019-12-25 04:04:26
问题 I m trying to make some experiments with NativeScript, but I m facing some weird error, and I can't get the point. I m having a simple list of pokemons inside of my component : import {Component} from '@angular/core'; import {Http} from '@angular/http'; @Component({ selector:'pokemon-list', templateUrl: 'components/pokemonList/pokemonList.html' }) export default class PokemonList { pokemons: Array<any>; constructor(private http:Http){ this.pokemons = [ {name: 'Bulbi', url: 'google.com'} ]; }

Angular Nativescript can't navigate in lazy module

笑着哭i 提交于 2019-12-25 01:47:00
问题 Template I used : Nativescript-Tabs-Template When I try to navigate to sibling component (both are in one lazy module) with: showItem() { this.routerExtensions.navigate(["details/"]); } (also done this - not sure if this is ok ) : this.routerExtensions.navigate(["details", { outlets: { searchTab: ['details'] } }]); I get the error : Error: Cannot match any routes. URL Segment: 'details' *But when I navigate with nsRouterLink it works: * <Label text="this works" [nsRouterLink]="['/details']><

How to manage the logged in state of user in nativescript vue?

自闭症网瘾萝莉.ら 提交于 2019-12-25 01:44:06
问题 I was wondering how to handle login/logout of the user so I did this: store.commit('load_state'); store.subscribe((mutations, state) => { ApplicationSettings.setString('store', JSON.stringify(state)); }); new Vue({ store, render: h => h('frame', [h(store.state.is_logged_in ? App : Login)]), created() { this.$store.commit('setNav', this.$navigateTo); if (this.$store.state.is_logged_in) { this.$store.dispatch('init'); } }, }).$start(); please note that loadstate initially loads the state from

Is there a way to display an image grid with tick able Images in Nativescript Angular?

ⅰ亾dé卋堺 提交于 2019-12-25 01:00:08
问题 I am trying to get images into a grid on a Nativescript Angular App and then be able to tick them and move to the next page with the id's or names of those images. i can do the image grid but i can't make them tickable. I'd be okayy with even just changing transparency on the clicked ones if possible. Something like this 回答1: You could use RadListView with GridLayout for this purpose. Checkmark on the Image is something you have to deal with your ng-template . Show the checkmark based on a