售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Getting Started with NativeScript
Table of Contents
Getting Started with NativeScript
Credits
Foreword
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Introduction to NativeScript
NativeScript
Telerik's NativeScript
Other competitors
NativeScript uniqueness
NativeScript is easy
NativeScript and TypeScript
What is TypeScript?
TypeScript's use in NativeScript
Choosing a development language
Common modules
Installing NativeScript
Prerequisites
node.js
iOS
Android
Installation
Installation help
The NativeScript command line
NativeScript commands
Creating your first application
Creating the application in easy steps
Running the app
Summary
2. The Project Structure
Project directory overview
The root folder
The app folder
The lib folder
The hooks folder
The node_modules folder
The tns-core-modules folder
The platforms folder
The platforms/android folder
Bad resource files on Android
Compiled Android application location
The platforms/iOS folder
The app folder
The .gradle folder
The App_Resources folder
The fonts folder
The app folder files
The package.json file
License
App.js
App.css
Application page
The main-page.js file
The main-page.css file
The main-page.xml file
The main-view-model.js file
Our rewrite of the main-view-model.js file
Foundational components
Application component
Frame component
Page component
Creating a second page
Creating additional files and pages
Creating settings.js
Navigating to another page
Running the application
Viewing our screen
Summary
3. Declarative UI, Styling, and Events
Declarative UI
XML parser
Page, StackLayout, label, and more
<Page ...> node
<StackLayout ...> node
<Label ...> node
FormattedString component
Complex properties
<Button ...> node
Second <Label...> node
Declarative UI and components
Visual components
Using the Declarative UI for our settings page
Our settings.xml file
Binding and event system
Event system
Binding
Styling the UI
What is CSS?
Why use CSS?
How to use CSS
Configuring your CSS Rules
Existing CSS properties
Exploring app.css
Trying CSS out and styling our application
Styling on your own
Summary
4. Building a Featured Application
Layouts
StackLayout
WrapLayout
AbsoluteLayout
DockLayout
GridLayout
Building our featured application
Nonvisual components
Dialogs
Alert dialog
Confirm dialog
Prompt dialog
Login dialog
Action dialog
Promises
The settings screen Declarative UI
GridLayouts
Building the main screen
JavaScript code
Declarative UI
Main page Declarative UI
Main page body
ScrollViews
More about bindings
Repeaters
Main-body footer
The main-page.css file
Application CSS
Fonts
Icons
Communication with the server
Trying out our application
The server
Setting up your own server
Trying crossCommunicator out.
Summary
5. Installing Third-Party Components
Places to find third-party components
The Telerik plugin site
npmjs.com
The NativeScript unofficial plugin list
How to install a third-party plugin component
Installing the vibration plugin
Installing the webSockets plugin
Installing the Telerik SideDrawer plugin
Using third-party components
Using the vibration plugin
Using Websockets
Using Telerik's side drawer
Easily using the components
Useful third-party components
Summary
6. Platform Differences
Android and iOS differences
The soft keyboard
The Page.loaded event
Code differences
Platform classes
Declarative UI
Declarative UI properties
Declarative UI platform qualifiers
Platform- and device-specific files
Screen size differences
Fonts
Our own custom resource folders
Compiled application resources on iOS
Compiled application resources on Android
Device differences
Summary
7. Testing and Deploying Your App
Testing your application
Test frameworks
Local testing of your code
Unit testing on the device
Installing the test framework
Writing tests
Running tests
Testing your app on a device or emulator
Understanding the call stack
Android call stack
iOS call stack
Debugging your application
Publishing your application
Publishing to iOS
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜