Giter VIP home page Giter VIP logo

nativescript-sdk-examples-js's Introduction

nativescript-sdk-examples-js

This repo contains the code of the NativeScript UI Widgets and NativeScript Framework Modules.

You can get the source code of the application and start exploring the code there, or you can read the documentation articles associated with each of the examples. The application is also very useful as a NativeScript playground - you can use the source code as a starting point and modify them to fit your app needs.

It is very easy to contribute to the samples and we encourage you to contribute any samples you think that will be useful for other developers. If you need a sample that is missing, please open a new issue so that other member of the community can help you.

Please read the contribution guide here.

All the samples have automated tests associated with them and you can be sure that they work with the latest NativeScript version.

The code is NativeScript Core based (using JavaScript)

We hope you will enjoy using this resource, if you have any feedback please open an issue.

Run the app from source code

git clone https://github.com/NativeScript/nativescript-sdk-examples-js.git
cd nativescript-sdk-examples-js
tns run android|ios

nativescript-sdk-examples-js's People

Contributors

bangseongbeom avatar bhargava-ramudu avatar davr59 avatar deeskayp avatar etabakov avatar ikoevska avatar jamessouth avatar jb-jonathan avatar m-emelchenkov avatar manoldonev avatar martoyankov avatar mrmowji avatar mudlabs avatar netlob avatar nickiliev avatar prakashdale avatar richardkeep avatar romanakhma avatar sasa-cj-jovanovic avatar sebdeveloper6952 avatar sebj54 avatar sis0k0 avatar stefan-kolb avatar svetoslavtsenov avatar theoriginaljosh avatar tjbourke avatar tsonevn avatar vchimev avatar vedranstanic82 avatar yringler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nativescript-sdk-examples-js's Issues

Docs improvement

I don't know if it's OK to put all minor docs problems in one Issue or not.

Here are some problems that I didn't know how to handle:

ActionBar

Is it "expect" or "except"?

In both the places where the doc talks of the fromObjectRecursive method, it says: "This function will create new Observable for each nested object (expect arrays and functions) from supplied JavaScript object." Ummm, is that actually "This function will create new Observable for each nested object (except arrays and functions) from supplied JavaScript object."? That's a whole different thing. If it DOES actually "expect" to see arrays and functions in the supplied object, could you please make that clearer?

TabView tabTextColor explanation could be expanded

Hi folks,

In my project I wanted to change the icon of a tab to a multi-colored one (well, essentially one color and a red dot), when I noticed that the icon instead became monochrome, and reflected the tabTextColor (or selectedTabTextColor) color set. This is on iOS at least.

Basically by default, on iOS, tabTextColor and selectedTabTextColor affect text color and icon color. Setting the iosIconRenderingMode property on TabView to alwaysOriginal changes this behavior, so that only text is affected. (In this case it's up to the developer to change the icon themselves when selected of course.)

I think it would be nice to make this behaviour explicit in the documentation.

presentationStyle, height and width don't work in showModal.

I change the property fullscreen and added a new property ios like below in nativescript-sdk-examples-js/app/ns-ui-category/modal-view/basics/basics-page.js:

function openModal(args) {
const mainView = args.object;
const option = {
context: { username: "test_username", password: "test" },
closeCallback: (username, password) => {
// Receive data from the modal view. e.g. username & password
alert(Username: ${username} : Password: ${password});
},
fullscreen: false,
ios: {
presentationStyle: 7,
height: 100,
width: 50
}

};
mainView.showModal(modalViewModule, option);

}

But, I find that presentationStyle, height and width don't work. The modal view is almost full screen.

Invalid links in README.md

As I see the following links in README.md are invalid: "NativeScript Core Cookbook", "articles", "read the documentation".

Feature Request: Allow reordering of examples in component article

The current behavior is that all examples are ordered alphabetically based on their folder names. This is fine for the moment where 'Basics' and 'Code-Behind' are very high alphabetically, but if I want to add an example starting with 'Android-...' or 'Angular-...' it's not fine.

As a proposal, this can be done in the metadata.md file below the '---' line like so: 'example-order: basics, code-behind, android-example...'. If there is an example that is not mentioned in this list or there is no list, they should be ordered alphabetically.

new FlexboxLayout

I have read the docs
But I can't find out how to import the FlexboxLayout from module

I tried

const FlexboxLayout = require("tns-core-modules/ui/layouts/flexbox-layout").FlexboxLayout;

and it crashed when I called let fbl = new FlexboxLayout()
Any idea?

Does setTimeout and setInterval work in the background on iOS and Android when the screen is locked?

Will you help me? I'm trying to build two applications.

One application requires to create a series of timers.
The other application requires communication with a server to exchange coordinates.

Both applications must work when the app goes in the background, when the user locks the screen, or when the screen goes black.

Could someone please confirm whether setTimeout and setInterval work in the background for iOS and Android?

I'm aware that android might required a permission to do so.
I'm aware that iOS requires adding keys/values in the Info. list to do so.

If they do but require extra work, could a link to a tutorial be included? Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.