nativescript

get content of webview in nativescript

会有一股神秘感。 提交于 2019-12-02 15:56:57
问题 Is there a way I can read the content of webview after the page is loaded ? The reason is redirect (like window.location.replace or window.location.href ) is not working in IOS in my case, works fine in Android. https://docs.nativescript.org/cookbook/ui/web-view I can access url, error. but how to access content ? Narayan 回答1: I was only looking for IOS. I found the answer and sharing it here. For Android I would like to point some leads. if (webView.ios) { var webHeader = webView.ios

DismissSoftInput() for search-bar for Nativescript-Vue

*爱你&永不变心* 提交于 2019-12-02 14:27:51
问题 Explaining the problem: The search-bar has no way of dismissing an open keyboard. This makes the search-bar a quite unusable as the normal user pattern is that the user search for something and then press the item and gets navigated there. On Android (at least on >= 5.x), the open keyboard will continue to stay open, even on the new page. Referring to the question on Github, anyone how to do that for Nativescript-Vue and not for Nativescript with Typescript Updated: Added Playground: https:/

Basic blur event in a Telerik Nativescript Mobile App

南笙酒味 提交于 2019-12-02 14:10:10
问题 I am writing a cross-platform mobile app using Telerik AppBuilder with NativeScript. I am going nuts trying to figure out how to get a basic "blur" or "onTextChanged" event on a TextField. I can figure out how to do things like "tap" events, but then why is it so hard to find a sample of someone doing "blur" or "onTextChanged"? I've tried this: var tagField = view.getViewById(page, "tfDescription") tagField.set("onblur", function(eventData) { pageData.set("debug", "blur this field: " + JSON

Correct way to populate listView with object items?

偶尔善良 提交于 2019-12-02 12:59:33
问题 In my NativeScript project, I am trying to fill a ListView with instances of a custom object (defined as an interface). But the output (on a android emulator) is quite strange : I am getting "[object object ... object]" spawned across multiple lines, instead of getting each instance name content, as I defined. This is my component.ts : import {Component} from "@angular/core"; interface FileItem { isDirectory:boolean; name:String; } @Component({ moduleId: module.id, selector: 'file-explorer',

Auto scroll to Bottom

妖精的绣舞 提交于 2019-12-02 12:42:16
问题 I am working on application with chat screen. But as normal screen it starts scrolling from top to bottom. But its should be from bottom to top. The application is in Telerik Nativescript platform. View.xml <ScrollView row="0" col="0"> <StackLayout class="history-content-area"> <Repeater items="{{messageHistory}}"> <Repeater.itemTemplate> <StackLayout> <!-- ITEMS GO HERE --> </StackLayout> </Repeater.itemTemplate> </Repeater> </StackLayout> </ScrollView> I need help in above code how can i

Accessability of native sensors in Nativescript

泪湿孤枕 提交于 2019-12-02 12:29:12
I am the decision of choosing to implement an app in either Nativescript (Cross platform IOS/Android) or doing a 'real' native app with java/swift accordingly. Discarding the obvious 1 codebase vs 2 codebase discussion, I am uncertain of the limitations of Nativescript, if any. The main concern lies in the app's heavy demand for sensor data. I have to use a lot of the phone sensors in the app. Sensors like the android sensors . I get mostly what Nativescript does. But the question is, will chosing Nativescript impact either the accessibility of sensors or the overall performance considering

NativeScript WebView loading local resources in src document

穿精又带淫゛_ 提交于 2019-12-02 12:13:09
问题 I am loading a local html file as the src for a NativeScript WebView component. Contained within the html file are script tags which reference javascript files that are also local resources (bundled within the app). The html file loads into the WebView just fine, but the referenced script file (mylib.js) does not. I suspect a pathing problem but I have tried almost every variation I can think of to no avail. My project is actually a NativeScript-Vue project and is as follows: App.vue

NativeScript: Disable all controls while ActivityIndicator is shown

余生长醉 提交于 2019-12-02 10:44:53
问题 Lets say there is a login page with username\password TextFields and login Button. When the button is pressed a request is set to a server and ActivityIndicator is shown. Currently I put StackLayout on top of all other controls not to give the user a possibility to click on them while processing the request. But in some cases TextField stays focused and the user can type there. I'm already using a component to wrap all TextFields to show validation errors: @Component({ selector: "field",

Sharing JSON data from server between 2 components

不问归期 提交于 2019-12-02 09:38:51
I posted this yesterday but I have changed so much of the code today I have basically re-written my question: I have a NativeScript with Angular app using the TabView template and a login form using a modal window over the tabs initially and this appears to be working OK - the login form has no tabs and when logged in I am taken to the TabView. Upon successful login I want to call methods within the tabbed components and update the respective templates with content specific to the logged in user. For example one of these is a list of user reports. I am trying to get a list of user reports from

How to make an accordion list with RadListView? (Nativescript)

夙愿已清 提交于 2019-12-02 09:24:23
I am showing data with RadListView that has categories and subentries (Nativescript Angular, iOS). I want to have the page load showing only the categories, and if the user clicks on any category, it toggles the entries (showing on click, then hiding on another click). Is this possible? I have not seen this successfully accomplished with the current version of pro ui and NS. I have not been able to get it to work myself. Further details about other approaches are here . There is an NS accordion plugin, but I think the goal here should be possible with straight code, especially because in my