├── .github ├── issue_template.md └── pull_request_template.md ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── demo-ng ├── .editorconfig ├── .gitignore ├── App_Resources │ ├── Android │ │ ├── app.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-ldpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-mdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ │ ├── values-v29 │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ └── styles.xml │ └── iOS │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon-1024.png │ │ │ ├── icon-20.png │ │ │ ├── icon-20@2x.png │ │ │ ├── icon-20@3x.png │ │ │ ├── icon-29.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ └── icon-83.5@2x.png │ │ ├── Contents.json │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen-AspectFill@3x.png │ │ └── LaunchScreen.Center.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-Center.png │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ └── LaunchScreen-Center@3x.png │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── build.xcconfig ├── angular.json ├── nativescript.config.ts ├── package-lock.json ├── package.json ├── references.d.ts ├── src │ ├── app.css │ ├── app │ │ ├── app-routing.module.ts │ │ ├── app.component.html │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ └── home │ │ │ ├── home.component.html │ │ │ ├── home.component.ts │ │ │ └── home.module.ts │ └── main.ts ├── tsconfig.json ├── tsfmt.json └── webpack.config.js ├── demo-vue ├── .editorconfig ├── .gitignore ├── App_Resources │ ├── Android │ │ ├── app.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-ldpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-mdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ │ ├── values-v29 │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ └── styles.xml │ └── iOS │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon-1024.png │ │ │ ├── icon-20.png │ │ │ ├── icon-20@2x.png │ │ │ ├── icon-20@3x.png │ │ │ ├── icon-29.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ └── icon-83.5@2x.png │ │ ├── Contents.json │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen-AspectFill@3x.png │ │ └── LaunchScreen.Center.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-Center.png │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ └── LaunchScreen-Center@3x.png │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── build.xcconfig ├── app │ ├── app.js │ ├── app.scss │ ├── components │ │ └── Home.vue │ └── fonts │ │ ├── fa-brands-400.ttf │ │ ├── fa-regular-400.ttf │ │ └── fa-solid-900.ttf ├── jsconfig.json ├── nativescript.config.ts ├── package-lock.json ├── package.json └── webpack.config.js ├── demo.gif ├── demo ├── .editorconfig ├── .gitignore ├── App_Resources │ ├── Android │ │ ├── app.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-ldpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-mdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ │ ├── drawable-xhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── background.png │ │ │ ├── icon.png │ │ │ └── logo.png │ │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ │ ├── values-v29 │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ └── styles.xml │ └── iOS │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon-1024.png │ │ │ ├── icon-20.png │ │ │ ├── icon-20@2x.png │ │ │ ├── icon-20@3x.png │ │ │ ├── icon-29.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ └── icon-83.5@2x.png │ │ ├── Contents.json │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ └── LaunchScreen-AspectFill@3x.png │ │ └── LaunchScreen.Center.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen-Center.png │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ └── LaunchScreen-Center@3x.png │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── build.xcconfig ├── nativescript.config.ts ├── package-lock.json ├── package.json ├── references.d.ts ├── src │ ├── app-root.xml │ ├── app.css │ ├── main-page.ts │ ├── main-page.xml │ ├── main-view-model.ts │ └── main.ts ├── tsconfig.json ├── tsfmt.json └── webpack.config.js ├── publish ├── nativescript-publish-1.0.0.tgz ├── pack.sh ├── package-lock.json ├── package.json └── publish.sh ├── src ├── .npmignore ├── index.d.ts ├── package-lock.json ├── package.json ├── paint.android.ts ├── paint.common.ts ├── paint.ios.ts ├── platforms │ ├── android │ │ └── include.gradle │ └── ios │ │ └── Podfile ├── references.d.ts ├── scripts │ ├── build-native.js │ └── postclone.js ├── tsconfig.json └── typings │ └── DAScratchPad.d.ts └── tslint.json /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | ### Make sure to check the demo app(s) for sample usage 2 | 3 | ### Make sure to check the existing issues in this repository 4 | 5 | ### If the demo apps cannot help and there is no issue for your problem, tell us about it 6 | Please, ensure your title is less than 63 characters long and starts with a capital 7 | letter. 8 | 9 | ### Which platform(s) does your issue occur on? 10 | - iOS/Android/Both 11 | - iOS/Android versions 12 | - emulator or device. What type of device? 13 | 14 | ### Please, provide the following version numbers that your issue occurs with: 15 | 16 | - CLI: (run `tns --version` to fetch it) 17 | - Cross-platform modules: (check the 'version' attribute in the 18 | `node_modules/tns-core-modules/package.json` file in your project) 19 | - Runtime(s): (look for the `"tns-android"` and `"tns-ios"` properties in the `package.json` file of your project) 20 | - Plugin(s): (look for the version numbers in the `package.json` file of your 21 | project and paste your dependencies and devDependencies here) 22 | 23 | ### Please, tell us how to recreate the issue in as much detail as possible. 24 | Describe the steps to reproduce it. 25 | 26 | ### Is there any code involved? 27 | - provide a code example to recreate the problem 28 | - (EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible. 29 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | ## PR Checklist 11 | 12 | - [ ] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages. 13 | - [ ] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. 14 | - [ ] All existing tests are passing 15 | - [ ] Tests for the changes are included 16 | 17 | ## What is the current behavior? 18 | 19 | 20 | ## What is the new behavior? 21 | 22 | 23 | Fixes/Implements/Closes #[Issue Number]. 24 | 25 | 26 | 27 | 36 | 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .idea 3 | .DS_Store 4 | *.esm.json 5 | *.js 6 | *.js.map 7 | *.log 8 | src/*.d.ts 9 | !src/index.d.ts 10 | !src/references.d.ts 11 | !src/scripts/*.js 12 | !seed-tests/*.js 13 | seed-tests/seed-copy/**/*.* 14 | seed-tests/seed-copy-new-git-repo/**/*.* 15 | !demo/karma.conf.js 16 | !demo/app/tests/*.js 17 | demo/*.d.ts 18 | !demo/references.d.ts 19 | demo/lib 20 | demo/platforms 21 | node_modules 22 | publish/src 23 | publish/package 24 | demo/report/report.html 25 | demo/report/stats.json 26 | !demo-vue/app/app.js -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | matrix: 2 | include: 3 | - stage: "Lint" 4 | language: node_js 5 | os: linux 6 | node_js: "8" 7 | script: cd src && npm run ci.tslint && cd ../demo && npm run ci.tslint 8 | - stage: "WebPack, Build and Test" 9 | os: osx 10 | env: 11 | - WebPack="iOS" 12 | osx_image: xcode10.0 13 | language: node_js 14 | node_js: "8" 15 | jdk: oraclejdk8 16 | script: cd demo && npm run build.plugin && npm i && tns build ios --bundle --env.uglify 17 | - language: android 18 | os: linux 19 | env: 20 | - WebPack="Android" 21 | jdk: oraclejdk8 22 | before_install: nvm install 8 23 | script: cd demo && npm run build.plugin && npm i && tns build android --bundle --env.uglify --env.snapshot 24 | - language: android 25 | env: 26 | - BuildAndroid="28" 27 | os: linux 28 | jdk: oraclejdk8 29 | before_install: nvm install stable 30 | script: 31 | - cd src && npm i && npm run tsc && cd ../demo && tns build android 32 | - os: osx 33 | env: 34 | - BuildiOS="12" 35 | - Xcode="10.0" 36 | osx_image: xcode10.0 37 | language: node_js 38 | node_js: "8" 39 | jdk: oraclejdk8 40 | script: 41 | - cd src && npm i && npm run tsc && cd ../demo && tns build ios 42 | - os: linux 43 | language: android 44 | dist: precise 45 | sudo: required 46 | jdk: oraclejdk8 47 | before_script: 48 | - echo no | android create avd --force -n test -t android-21 -b armeabi-v7a 49 | - emulator -avd test -no-audio -no-window & 50 | - android-wait-for-emulator 51 | before_install: 52 | - nvm install 8 53 | script: cd src && npm run test.android 54 | - os: osx 55 | language: node_js 56 | node_js: "8" 57 | jdk: oraclejdk8 58 | osx_image: xcode10.0 59 | script: cd src && npm run test.ios 60 | 61 | android: 62 | components: 63 | - tools 64 | - platform-tools 65 | - build-tools-28.0.3 66 | - android-28 67 | - extra-android-m2repository 68 | - sys-img-armeabi-v7a-android-21 69 | 70 | before_install: 71 | - sudo pip install --upgrade pip 72 | - sudo pip install six 73 | 74 | install: 75 | - echo no | npm install -g nativescript 76 | - tns usage-reporting disable 77 | - tns error-reporting disable 78 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright (c) 2015-2019 Progress Software Corporation 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NativeScript 7.0+ 2 | 3 | Use version 2.1.0 of the plugin 4 | 5 | # NativeScript Paint 6 | 7 | ![apple](https://cdn3.iconfinder.com/data/icons/picons-social/57/16-apple-32.png) ![android](https://cdn4.iconfinder.com/data/icons/logos-3/228/android-32.png) 8 | 9 | [![npm version](https://badge.fury.io/js/nativescript-paint.svg)](http://badge.fury.io/js/nativescript-paint) 10 | 11 | [![NPM](https://nodei.co/npm/nativescript-paint.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/nativescript-paint/) 12 | 13 | This plugin allows the artist to create paintings in an app using opacity and width settings cross platform. On iOS, an Airbrush as well as a Paintbrush is available. With the Airbrush, you can control Airbrush Flow to make the paint effect change. This plugin would be useful to folks who need a more art-friendly type plugin. Use with the [Color Picker plugin](https://market.nativescript.org/plugins/nativescript-color-picker) to enable color changes. 14 | 15 | ![demo](demo.gif) 16 | 17 | ## Installation 18 | 19 | ```javascript 20 | tns plugin add nativescript-paint 21 | ``` 22 | 23 | ### Requiring the plugin 24 | 25 | ```js 26 | import { PaintPad } from 'nativescript-paint'; 27 | ``` 28 | 29 | ### Using the PaintPad 30 | 31 | #### JavaScript 32 | 33 | 1. Add the plugin to your xml 34 | 35 | ```bash 36 | 38 | ``` 39 | 40 | 2. Create a PaintPad area 41 | 42 | ```bash 43 | 44 | ``` 45 | 46 | #### Angular 47 | 48 | 1. Register the plugin in a module 49 | 50 | ```js 51 | import { registerElement } from 'nativescript-angular/element-registry'; 52 | registerElement('PaintPad', () => require('nativescript-paint').PaintPad); 53 | ``` 54 | 55 | 2. Add it to your markup 56 | 57 | ```js 58 | 66 | ``` 67 | 68 | 3. Reference the PaintPad by id to manipulate it 69 | 70 | ```js 71 | @ViewChild('PaintPad') PaintPad: ElementRef; 72 | this.myPaintPad = this.PaintPad.nativeElement; 73 | ``` 74 | 75 | #### Vue 76 | 77 | 1. In `main.js`, register the element: 78 | 79 | ```js 80 | Vue.registerElement('PaintPad', () => require('nativescript-paint').PaintPad); 81 | ``` 82 | 83 | 2. Use it in your app: 84 | 85 | ```bash 86 | 94 | ``` 95 | 96 | 3. Reference the PaintPad by ref to manipulate it 97 | 98 | ```js 99 | selectAirBrush() { 100 | this.$refs.paintPad.nativeView.setToolType(1); 101 | } 102 | ``` 103 | 104 | ## Demos 105 | 106 | In `/src`, you can use npm scripts to run demos in vanilla JS, Angular and Vue. Run: 107 | 108 | `npm run demo.ios` or `npm run demo-ng.ios` or `npm run demo-vue.ios`. Reset the demos similarly, running `npm run demo(-ng or -vue).reset`. 109 | 110 | ## Usage 111 | 112 | Describe any usage specifics for your plugin. Give examples for Android, iOS, Angular if needed. See [nativescript-drop-down](https://www.npmjs.com/package/nativescript-drop-down) for example. 113 | `javascript Usage code snippets here`) 114 | 115 | | iOS | Android | 116 | | ------------------------------------------------------- | ---------------------------------------------------------- | 117 | | [DAScratchPad](https://github.com/dblapps/DAScratchPad) | [FreeDrawView](https://android-arsenal.com/details/1/4931) | 118 | 119 | ## API 120 | 121 | Describe your plugin methods and properties here. See [nativescript-feedback](https://github.com/EddyVerbruggen/nativescript-feedback) for example. 122 | 123 | | Property | Default | Description | 124 | | --------------- | ------------------------ | ---------------------------------------------------------- | 125 | | `drawWidth` | 5 | width of the brush | 126 | | `drawColor` | #3489db | a hex code for color | 127 | | `drawOpacity` | 1 (iOS) or 255 (Android) | on iOS, set this to between 0-1. On Android, between 0-255 | 128 | | `airBrushFlow` | 0.7 | iOS only - how heavy the Airbrush paints | 129 | | `getPainting` | | save an image of your painting | 130 | | `clearPainting` | | clear the paint area | 131 | | `setToolType` | 0 | iOS only - set 0 for Paintbrush, 1 for Airbrush | 132 | 133 | ## Credits 134 | 135 | With gratitude to Brad Martin, author of the first drawing plugin [NativeScript-Drawingpad](https://market.nativescript.org/plugins/nativescript-drawingpad), on which this plugin is heavily based, and to the help of Nathan Walker and Osei Fortune. ❤️ 136 | 137 | ## License 138 | 139 | Apache License Version 2.0, January 2004 140 | 141 | ``` 142 | 143 | ``` 144 | -------------------------------------------------------------------------------- /demo-ng/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | 9 | [*.json] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.ts] 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /demo-ng/.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # NativeScript Template 7 | *.js.map 8 | *.js 9 | !ngcc.config.js 10 | !webpack.config.js 11 | 12 | # Logs 13 | logs 14 | *.log 15 | npm-debug.log* 16 | yarn-debug.log* 17 | yarn-error.log* 18 | 19 | # General 20 | .DS_Store 21 | .AppleDouble 22 | .LSOverride 23 | .idea 24 | .cloud 25 | .project 26 | tmp/ 27 | typings/ 28 | 29 | # Visual Studio Code 30 | .vscode/* 31 | !.vscode/settings.json 32 | !.vscode/tasks.json 33 | !.vscode/launch.json 34 | !.vscode/extensions.json 35 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // implementation 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | // If you want to add something to be applied before applying plugins' include.gradle files 9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1" 10 | // create a file named before-plugins.gradle in the current directory and place it there 11 | 12 | android { 13 | defaultConfig { 14 | minSdkVersion 17 15 | generatedDensities = [] 16 | } 17 | aaptOptions { 18 | additionalParameters "--no-version-vectors" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 28 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/values-v29/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "icon-29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "icon-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "icon-20.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "icon-20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "icon-29.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "icon-29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "icon-40.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "icon-40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "icon-76.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "icon-76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "icon-83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "icon-1024.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-AspectFill@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-Center@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-ng/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /demo-ng/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | -------------------------------------------------------------------------------- /demo-ng/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "cli": { 6 | "defaultCollection": "@nativescript/schematics" 7 | }, 8 | "projects": { 9 | "hello-world": { 10 | "root": "", 11 | "sourceRoot": "src", 12 | "projectType": "application", 13 | "prefix": "ns" 14 | } 15 | }, 16 | "defaultProject": "hello-world" 17 | } 18 | -------------------------------------------------------------------------------- /demo-ng/nativescript.config.ts: -------------------------------------------------------------------------------- 1 | import { NativeScriptConfig } from '@nativescript/core'; 2 | 3 | export default { 4 | id: 'org.nativescript.demong', 5 | appResourcesPath: 'App_Resources', 6 | android: { 7 | v8Flags: '--expose_gc', 8 | markingMode: 'none' 9 | } 10 | } as NativeScriptConfig; -------------------------------------------------------------------------------- /demo-ng/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nativescript/template-hello-world-ng", 3 | "main": "main.js", 4 | "version": "7.0.2", 5 | "description": "NativeScript Application", 6 | "license": "SEE LICENSE IN ", 7 | "repository": "", 8 | "dependencies": { 9 | "@angular/animations": "~10.1.0", 10 | "@angular/common": "~10.1.0", 11 | "@angular/compiler": "~10.1.0", 12 | "@angular/core": "~10.1.0", 13 | "@angular/forms": "~10.1.0", 14 | "@angular/platform-browser": "~10.1.0", 15 | "@angular/platform-browser-dynamic": "~10.1.0", 16 | "@angular/router": "~10.1.0", 17 | "@nativescript/angular": "~10.1.0", 18 | "@nativescript/core": "~7.0.0", 19 | "@nativescript/theme": "~2.3.0", 20 | "nativescript-paint": "file:../src", 21 | "nativescript-color-picker": "^1.5.0", 22 | "reflect-metadata": "~0.1.12", 23 | "rxjs": "^6.6.0", 24 | "zone.js": "~0.11.1" 25 | }, 26 | "devDependencies": { 27 | "@angular/compiler-cli": "~10.1.0", 28 | "@nativescript/android": "7.0.0", 29 | "@nativescript/types": "~7.0.0", 30 | "@nativescript/webpack": "~3.0.0", 31 | "@ngtools/webpack": "~10.1.0", 32 | "@types/node": "^14.6.4", 33 | "typescript": "~3.9.0" 34 | }, 35 | "private": "true", 36 | "readme": "NativeScript Application" 37 | } 38 | -------------------------------------------------------------------------------- /demo-ng/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /demo-ng/src/app.css: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.css file is where you place CSS rules that 3 | you would like to apply to your entire application. Check out 4 | http://docs.nativescript.org/ui/styling for a full list of the CSS 5 | selectors and properties you can use to style UI components. 6 | 7 | /* 8 | In many cases you may want to use the NativeScript core theme instead 9 | of writing your own CSS rules. You can learn more about the 10 | NativeScript core theme at https://github.com/nativescript/theme 11 | The imported CSS rules must precede all other types of rules. 12 | */ 13 | @import "~@nativescript/theme/css/core.css"; 14 | @import "~@nativescript/theme/css/default.css"; 15 | 16 | /* Place any CSS rules you want to apply on both iOS and Android here. 17 | This is where the vast majority of your CSS code goes. */ 18 | 19 | /* 20 | The following CSS rule changes the font size of all Buttons that have the 21 | "-primary" class modifier. 22 | */ 23 | Button.-primary { 24 | font-size: 18; 25 | } 26 | -------------------------------------------------------------------------------- /demo-ng/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { Routes } from "@angular/router"; 3 | import { NativeScriptRouterModule } from "@nativescript/angular"; 4 | import { HomeComponent } from "./home/home.component"; 5 | 6 | const routes: Routes = [ 7 | { path: '', redirectTo: '/home', pathMatch: 'full' }, 8 | { path: 'home', component: HomeComponent }, 9 | ]; 10 | 11 | @NgModule({ 12 | imports: [NativeScriptRouterModule.forRoot(routes)], 13 | exports: [NativeScriptRouterModule] 14 | }) 15 | export class AppRoutingModule { } 16 | -------------------------------------------------------------------------------- /demo-ng/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /demo-ng/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from "@angular/core"; 2 | 3 | @Component({ 4 | selector: "ns-app", 5 | templateUrl: "./app.component.html" 6 | }) 7 | export class AppComponent { } 8 | -------------------------------------------------------------------------------- /demo-ng/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; 2 | import { NativeScriptModule } from "@nativescript/angular"; 3 | import { AppRoutingModule } from "./app-routing.module"; 4 | import { AppComponent } from "./app.component"; 5 | import { HomeModule } from "./home/home.module"; 6 | import { PaintPad } from "nativescript-paint"; 7 | 8 | @NgModule({ 9 | bootstrap: [ 10 | AppComponent 11 | ], 12 | imports: [ 13 | NativeScriptModule, 14 | AppRoutingModule, 15 | HomeModule 16 | ], 17 | declarations: [ 18 | AppComponent, 19 | ], 20 | providers: [ 21 | PaintPad 22 | ], 23 | schemas: [ 24 | NO_ERRORS_SCHEMA 25 | ] 26 | }) 27 | export class AppModule { } 28 | -------------------------------------------------------------------------------- /demo-ng/src/app/home/home.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 32 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 53 | 54 | 55 | 56 | 57 | 58 | 67 | 68 | 69 | 70 | 71 | 72 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /demo-ng/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ElementRef, ViewChild } from '@angular/core'; 2 | import { Page } from '@nativescript/core/ui/page'; 3 | import { PaintPad } from 'nativescript-paint'; 4 | import { ColorPicker } from 'nativescript-color-picker'; 5 | import * as platformModule from '@nativescript/core/platform'; 6 | 7 | @Component({ 8 | selector: 'home', 9 | moduleId: module.id, 10 | templateUrl: './home.component.html', 11 | }) 12 | export class HomeComponent implements OnInit { 13 | myPaintPad: PaintPad; 14 | colorPicker: ColorPicker; 15 | mainPage: Page; 16 | drawWidth: number = 5; 17 | drawColor: string = '#3489db'; 18 | drawOpacity: number = 0; 19 | maxOpacity: number = 0; 20 | airBrushFlow: number = 0.7; 21 | paintingImage: {}; 22 | @ViewChild('PaintPad', {static: true}) PaintPad: ElementRef; 23 | 24 | ngOnInit(): void { 25 | if (platformModule.isIOS) { 26 | this.drawOpacity = 1; 27 | this.maxOpacity = 1; 28 | } else { 29 | this.drawOpacity = 255; 30 | this.maxOpacity = 255; 31 | } 32 | this.myPaintPad = this.PaintPad.nativeElement; 33 | this.colorPicker = new ColorPicker(); 34 | } 35 | 36 | //methods 37 | getMyPainting() { 38 | this.myPaintPad.getPainting().then(img => { 39 | this.paintingImage = img; 40 | }); 41 | } 42 | 43 | clearMyPainting() { 44 | this.myPaintPad.clearPainting(); 45 | this.paintingImage = null; 46 | } 47 | 48 | selectAirBrush() { 49 | this.myPaintPad.setToolType(1); 50 | } 51 | 52 | selectPaintBrush() { 53 | this.myPaintPad.setToolType(0); 54 | } 55 | 56 | widthChange(event){ 57 | let slider = event.object; 58 | this.drawWidth = slider.value; 59 | } 60 | 61 | opacityChange(event){ 62 | let slider = event.object; 63 | this.drawOpacity = slider.value; 64 | } 65 | 66 | airbrushFlowChange(event){ 67 | let slider = event.object; 68 | this.airBrushFlow = slider.value; 69 | } 70 | 71 | pickColor() { 72 | this.colorPicker 73 | .show('#3489db', 'HEX') 74 | .then(result => { 75 | this.drawColor = result.toString(); 76 | }) 77 | .catch(err => { 78 | console.log(err); 79 | }); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /demo-ng/src/app/home/home.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; 2 | import { NativeScriptCommonModule } from '@nativescript/angular'; 3 | import { HomeComponent } from './home.component'; 4 | 5 | import { registerElement } from '@nativescript/angular'; 6 | registerElement('PaintPad', () => require('nativescript-paint').PaintPad); 7 | 8 | @NgModule({ 9 | imports: [ 10 | NativeScriptCommonModule 11 | ], 12 | declarations: [ 13 | HomeComponent 14 | ], 15 | schemas: [NO_ERRORS_SCHEMA], 16 | }) 17 | export class HomeModule {} 18 | -------------------------------------------------------------------------------- /demo-ng/src/main.ts: -------------------------------------------------------------------------------- 1 | // this import should be first in order to load some required settings (like globals and reflect-metadata) 2 | import { platformNativeScriptDynamic } from "@nativescript/angular"; 3 | 4 | import { AppModule } from "./app/app.module"; 5 | 6 | // A traditional NativeScript application starts by initializing global objects, 7 | // setting up global CSS rules, creating, and navigating to the main page. 8 | // Angular applications need to take care of their own initialization: 9 | // modules, components, directives, routes, DI providers. 10 | // A NativeScript Angular app needs to make both paradigms work together, 11 | // so we provide a wrapper platform object, platformNativeScriptDynamic, 12 | // that sets up a NativeScript application and can bootstrap the Angular framework. 13 | platformNativeScriptDynamic().bootstrapModule(AppModule); 14 | -------------------------------------------------------------------------------- /demo-ng/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "ESNext", 4 | "target": "es2015", 5 | "moduleResolution": "node", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true, 8 | "noEmitHelpers": true, 9 | "noEmitOnError": true, 10 | "skipLibCheck": true, 11 | "lib": [ 12 | "es2018", "es2017", "dom", "es6" 13 | ], 14 | "baseUrl": ".", 15 | "paths": { 16 | "~/*": [ 17 | "app/*" 18 | ] 19 | } 20 | }, 21 | "include": [ 22 | "../src", 23 | "src/tests/**/*.ts", 24 | "src/**/*.ios.ts", 25 | "src/**/*.android.ts" 26 | ], 27 | "files": [ 28 | "./references.d.ts", 29 | "./src/main.ts" 30 | ], 31 | "exclude": [ 32 | "node_modules", 33 | "platforms", 34 | "e2e" 35 | ] 36 | } -------------------------------------------------------------------------------- /demo-ng/tsfmt.json: -------------------------------------------------------------------------------- 1 | { 2 | "indentSize": 2, 3 | "tabSize": 2 4 | } 5 | -------------------------------------------------------------------------------- /demo-vue/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | 9 | [*.json] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.js] 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /demo-vue/.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | !hooks/after-createProject/*.js 4 | node_modules/ 5 | platforms/ 6 | 7 | # NativeScript Template 8 | *.js.map 9 | !webpack.config.js 10 | *.css 11 | 12 | # Logs 13 | logs 14 | *.log 15 | npm-debug.log* 16 | yarn-debug.log* 17 | yarn-error.log* 18 | 19 | # General 20 | .DS_Store 21 | .AppleDouble 22 | .LSOverride 23 | .idea 24 | .cloud 25 | .project 26 | tmp/ 27 | typings/ 28 | 29 | # Visual Studio Code 30 | .vscode/* 31 | !.vscode/settings.json 32 | !.vscode/tasks.json 33 | !.vscode/launch.json 34 | !.vscode/extensions.json 35 | -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // implementation 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | // If you want to add something to be applied before applying plugins' include.gradle files 9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1" 10 | // create a file named before-plugins.gradle in the current directory and place it there 11 | 12 | android { 13 | defaultConfig { 14 | minSdkVersion 17 15 | generatedDensities = [] 16 | } 17 | aaptOptions { 18 | additionalParameters "--no-version-vectors" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 28 | -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/values-v29/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo-vue/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17 | 18 | 20 | 21 | 22 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 42 | 43 | -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "icon-29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "icon-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "icon-20.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "icon-20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "icon-29.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "icon-29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "icon-40.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "icon-40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "icon-76.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "icon-76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "icon-83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "icon-1024.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-AspectFill@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-Center@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIStatusBarStyle 47 | UIStatusBarStyleLightContent 48 | UIViewControllerBasedStatusBarAppearance 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /demo-vue/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | -------------------------------------------------------------------------------- /demo-vue/app/app.js: -------------------------------------------------------------------------------- 1 | import Vue from "nativescript-vue"; 2 | import Home from "./components/Home"; 3 | 4 | Vue.registerElement('PaintPad', () => require('nativescript-paint').PaintPad); 5 | new Vue({ 6 | render: h => h('frame', [h(Home)]), 7 | }).$start(); 8 | -------------------------------------------------------------------------------- /demo-vue/app/app.scss: -------------------------------------------------------------------------------- 1 | @import "~@nativescript/theme/core"; 2 | @import "~@nativescript/theme/blue"; 3 | 4 | // Place any CSS rules you want to apply on both iOS and Android here. 5 | // This is where the vast majority of your CSS code goes. 6 | 7 | // Font icon class 8 | .fab { 9 | font-family: "Font Awesome 5 Brands", "fa-brands-400"; 10 | font-weight: 400; 11 | } 12 | 13 | .fas { 14 | font-family: "Font Awesome 5 Free", "fa-solid-900"; 15 | font-weight: 900; 16 | } 17 | 18 | .far { 19 | font-family: "Font Awesome 5 Free", "fa-regular-400"; 20 | font-weight: 400; 21 | } -------------------------------------------------------------------------------- /demo-vue/app/components/Home.vue: -------------------------------------------------------------------------------- 1 | 88 | 89 | 161 | 162 | -------------------------------------------------------------------------------- /demo-vue/app/fonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/app/fonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /demo-vue/app/fonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/app/fonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /demo-vue/app/fonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo-vue/app/fonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /demo-vue/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "./", 4 | "paths": { 5 | "~/*": ["app/*"] 6 | } 7 | }, 8 | "include": ["app/**/*"] 9 | } 10 | -------------------------------------------------------------------------------- /demo-vue/nativescript.config.ts: -------------------------------------------------------------------------------- 1 | import { NativeScriptConfig } from '@nativescript/core'; 2 | 3 | export default { 4 | id: 'org.nativescript.demovue', 5 | appResourcesPath: 'App_Resources', 6 | android: { 7 | v8Flags: '--expose_gc', 8 | markingMode: 'none' 9 | } 10 | } as NativeScriptConfig; -------------------------------------------------------------------------------- /demo-vue/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo-vue", 3 | "version": "1.0.0", 4 | "description": "Vue demo app for the NativeScript Paint plugin", 5 | "author": "Jen Looper ", 6 | "license": "MIT", 7 | "main": "app.js", 8 | "dependencies": { 9 | "@nativescript/core": "~7.0.0", 10 | "@nativescript/theme": "~2.3.0", 11 | "nativescript-vue": "~2.8.0", 12 | "nativescript-paint": "file:../src", 13 | "nativescript-color-picker": "^1.5.0" 14 | }, 15 | "devDependencies": { 16 | "@babel/core": "~7.1.0", 17 | "@babel/preset-env": "~7.1.0", 18 | "@nativescript/android": "7.0.0", 19 | "@nativescript/webpack": "~3.0.0", 20 | "babel-loader": "~8.0.0", 21 | "nativescript-vue-template-compiler": "~2.8.0", 22 | "node-sass": "^4.7.1", 23 | "typescript": "~3.9.0", 24 | "vue-loader": "~15.9.3" 25 | }, 26 | "private": "true" 27 | } 28 | -------------------------------------------------------------------------------- /demo-vue/webpack.config.js: -------------------------------------------------------------------------------- 1 | const { join, relative, resolve, sep } = require("path"); 2 | 3 | const webpack = require("webpack"); 4 | const { CleanWebpackPlugin } = require("clean-webpack-plugin"); 5 | const CopyWebpackPlugin = require("copy-webpack-plugin"); 6 | const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); 7 | const TerserPlugin = require("terser-webpack-plugin"); 8 | 9 | const VueLoaderPlugin = require('vue-loader/lib/plugin'); 10 | const NsVueTemplateCompiler = require("nativescript-vue-template-compiler"); 11 | 12 | const nsWebpack = require("@nativescript/webpack"); 13 | const nativescriptTarget = require("@nativescript/webpack/nativescript-target"); 14 | const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); 15 | const hashSalt = Date.now().toString(); 16 | 17 | module.exports = env => { 18 | // Add your custom Activities, Services and other android app components here. 19 | const appComponents = env.appComponents || []; 20 | appComponents.push(...[ 21 | "@nativescript/core/ui/frame", 22 | "@nativescript/core/ui/frame/activity", 23 | ]); 24 | 25 | const platform = env && (env.android && "android" || env.ios && "ios" || env.platform); 26 | if (!platform) { 27 | throw new Error("You need to provide a target platform!"); 28 | } 29 | 30 | const platforms = ["ios", "android"]; 31 | const projectRoot = __dirname; 32 | 33 | if (env.platform) { 34 | platforms.push(env.platform); 35 | } 36 | 37 | // Default destination inside platforms//... 38 | const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot)); 39 | 40 | const { 41 | // The 'appPath' and 'appResourcesPath' values are fetched from 42 | // the nsconfig.json configuration file. 43 | appPath = "app", 44 | appResourcesPath = "app/App_Resources", 45 | 46 | // You can provide the following flags when running 'tns run android|ios' 47 | snapshot, // --env.snapshot 48 | production, // --env.production 49 | report, // --env.report 50 | hmr, // --env.hmr 51 | sourceMap, // --env.sourceMap 52 | hiddenSourceMap, // --env.hiddenSourceMap 53 | unitTesting, // --env.unitTesting 54 | testing, // --env.testing 55 | verbose, // --env.verbose 56 | snapshotInDocker, // --env.snapshotInDocker 57 | skipSnapshotTools, // --env.skipSnapshotTools 58 | compileSnapshot // --env.compileSnapshot 59 | } = env; 60 | 61 | const useLibs = compileSnapshot; 62 | const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap; 63 | const externals = nsWebpack.getConvertedExternals(env.externals); 64 | 65 | const mode = production ? "production" : "development" 66 | 67 | const appFullPath = resolve(projectRoot, appPath); 68 | const hasRootLevelScopedModules = nsWebpack.hasRootLevelScopedModules({ projectDir: projectRoot }); 69 | let coreModulesPackageName = "tns-core-modules"; 70 | const alias = env.alias || {}; 71 | alias['~/package.json'] = resolve(projectRoot, 'package.json'); 72 | alias['~'] = appFullPath; 73 | alias['@'] = appFullPath; 74 | alias['vue'] = 'nativescript-vue'; 75 | 76 | if (hasRootLevelScopedModules) { 77 | coreModulesPackageName = "@nativescript/core"; 78 | alias["tns-core-modules"] = coreModulesPackageName; 79 | } 80 | 81 | const appResourcesFullPath = resolve(projectRoot, appResourcesPath); 82 | 83 | const copyIgnore = { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }; 84 | 85 | const entryModule = nsWebpack.getEntryModule(appFullPath, platform); 86 | const entryPath = `.${sep}${entryModule}`; 87 | const entries = env.entries || {}; 88 | entries.bundle = entryPath; 89 | 90 | const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("@nativescript") > -1); 91 | if (platform === "ios" && !areCoreModulesExternal && !testing) { 92 | entries["tns_modules/@nativescript/core/inspector_modules"] = "inspector_modules"; 93 | }; 94 | console.log(`Bundling application for entryPath ${entryPath}...`); 95 | 96 | let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist); 97 | 98 | const itemsToClean = [`${dist}/**/*`]; 99 | if (platform === "android") { 100 | itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`); 101 | itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`); 102 | } 103 | 104 | nsWebpack.processAppComponents(appComponents, platform); 105 | const config = { 106 | mode: mode, 107 | context: appFullPath, 108 | externals, 109 | watchOptions: { 110 | ignored: [ 111 | appResourcesFullPath, 112 | // Don't watch hidden files 113 | "**/.*", 114 | ], 115 | }, 116 | target: nativescriptTarget, 117 | // target: nativeScriptVueTarget, 118 | entry: entries, 119 | output: { 120 | pathinfo: false, 121 | path: dist, 122 | sourceMapFilename, 123 | libraryTarget: "commonjs2", 124 | filename: "[name].js", 125 | globalObject: "global", 126 | hashSalt 127 | }, 128 | resolve: { 129 | extensions: [".vue", ".ts", ".js", ".scss", ".css"], 130 | // Resolve {N} system modules from @nativescript/core 131 | modules: [ 132 | resolve(__dirname, `node_modules/${coreModulesPackageName}`), 133 | resolve(__dirname, "node_modules"), 134 | `node_modules/${coreModulesPackageName}`, 135 | "node_modules", 136 | ], 137 | alias, 138 | // resolve symlinks to symlinked modules 139 | symlinks: true, 140 | }, 141 | resolveLoader: { 142 | // don't resolve symlinks to symlinked loaders 143 | symlinks: false, 144 | }, 145 | node: { 146 | // Disable node shims that conflict with NativeScript 147 | "http": false, 148 | "timers": false, 149 | "setImmediate": false, 150 | "fs": "empty", 151 | "__dirname": false, 152 | }, 153 | devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"), 154 | optimization: { 155 | runtimeChunk: "single", 156 | noEmitOnErrors: true, 157 | splitChunks: { 158 | cacheGroups: { 159 | vendor: { 160 | name: "vendor", 161 | chunks: "all", 162 | test: (module) => { 163 | const moduleName = module.nameForCondition ? module.nameForCondition() : ''; 164 | return /[\\/]node_modules[\\/]/.test(moduleName) || 165 | appComponents.some(comp => comp === moduleName); 166 | 167 | }, 168 | enforce: true, 169 | }, 170 | }, 171 | }, 172 | minimize: Boolean(production), 173 | minimizer: [ 174 | new TerserPlugin({ 175 | parallel: true, 176 | cache: true, 177 | sourceMap: isAnySourceMapEnabled, 178 | terserOptions: { 179 | output: { 180 | comments: false, 181 | semicolons: !isAnySourceMapEnabled 182 | }, 183 | compress: { 184 | // The Android SBG has problems parsing the output 185 | // when these options are enabled 186 | 'collapse_vars': platform !== "android", 187 | sequences: platform !== "android", 188 | }, 189 | keep_fnames: true, 190 | }, 191 | }), 192 | ], 193 | }, 194 | module: { 195 | rules: [{ 196 | include: [join(appFullPath, entryPath + ".js"), join(appFullPath, entryPath + ".ts")], 197 | use: [ 198 | // Require all Android app components 199 | platform === "android" && { 200 | loader: "@nativescript/webpack/helpers/android-app-components-loader", 201 | options: { modules: appComponents }, 202 | }, 203 | 204 | { 205 | loader: "@nativescript/webpack/bundle-config-loader", 206 | options: { 207 | registerPages: true, // applicable only for non-angular apps 208 | loadCss: !snapshot, // load the application css if in debug mode 209 | unitTesting, 210 | appFullPath, 211 | projectRoot, 212 | ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform) 213 | }, 214 | }, 215 | ].filter(loader => Boolean(loader)), 216 | }, 217 | { 218 | test: /[\/|\\]app\.css$/, 219 | use: [ 220 | '@nativescript/webpack/helpers/style-hot-loader', 221 | { 222 | loader: "@nativescript/webpack/helpers/css2json-loader", 223 | options: { useForImports: true } 224 | }, 225 | ], 226 | }, 227 | { 228 | test: /[\/|\\]app\.scss$/, 229 | use: [ 230 | '@nativescript/webpack/helpers/style-hot-loader', 231 | { 232 | loader: "@nativescript/webpack/helpers/css2json-loader", 233 | options: { useForImports: true } 234 | }, 235 | 'sass-loader', 236 | ], 237 | }, 238 | { 239 | test: /\.css$/, 240 | exclude: /[\/|\\]app\.css$/, 241 | use: [ 242 | '@nativescript/webpack/helpers/style-hot-loader', 243 | '@nativescript/webpack/helpers/apply-css-loader.js', 244 | { loader: "css-loader", options: { url: false } }, 245 | ], 246 | }, 247 | { 248 | test: /\.scss$/, 249 | exclude: /[\/|\\]app\.scss$/, 250 | use: [ 251 | '@nativescript/webpack/helpers/style-hot-loader', 252 | '@nativescript/webpack/helpers/apply-css-loader.js', 253 | { loader: "css-loader", options: { url: false } }, 254 | 'sass-loader', 255 | ], 256 | }, 257 | { 258 | test: /\.js$/, 259 | loader: 'babel-loader', 260 | }, 261 | { 262 | test: /\.ts$/, 263 | loader: 'ts-loader', 264 | options: { 265 | appendTsSuffixTo: [/\.vue$/], 266 | allowTsInNodeModules: true, 267 | compilerOptions: { 268 | declaration: false 269 | }, 270 | getCustomTransformers: (program) => ({ 271 | before: [ 272 | require("@nativescript/webpack/transformers/ns-transform-native-classes").default 273 | ] 274 | }) 275 | }, 276 | }, 277 | { 278 | test: /\.vue$/, 279 | loader: "vue-loader", 280 | options: { 281 | compiler: NsVueTemplateCompiler, 282 | }, 283 | }, 284 | ], 285 | }, 286 | plugins: [ 287 | // ... Vue Loader plugin omitted 288 | // make sure to include the plugin! 289 | new VueLoaderPlugin(), 290 | // Define useful constants like TNS_WEBPACK 291 | new webpack.DefinePlugin({ 292 | "global.TNS_WEBPACK": "true", 293 | "global.isAndroid": platform === 'android', 294 | "global.isIOS": platform === 'ios', 295 | "TNS_ENV": JSON.stringify(mode), 296 | "process": "global.process" 297 | }), 298 | // Remove all files from the out dir. 299 | new CleanWebpackPlugin({ 300 | cleanOnceBeforeBuildPatterns: itemsToClean, 301 | verbose: !!verbose 302 | }), 303 | // Copy assets 304 | new CopyWebpackPlugin({ 305 | patterns: [ 306 | { from: 'assets/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 307 | { from: 'fonts/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }, 308 | { from: '**/*.+(jpg|png)', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } } 309 | ], 310 | }), 311 | new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), 312 | // For instructions on how to set up workers with webpack 313 | // check out https://github.com/nativescript/worker-loader 314 | new NativeScriptWorkerPlugin(), 315 | new nsWebpack.PlatformFSPlugin({ 316 | platform, 317 | platforms, 318 | }), 319 | // Does IPC communication with the {N} CLI to notify events when running in watch mode. 320 | new nsWebpack.WatchStateLoggerPlugin() 321 | ], 322 | }; 323 | 324 | if (unitTesting) { 325 | config.module.rules.push( 326 | { 327 | test: /-page\.js$/, 328 | use: "@nativescript/webpack/helpers/script-hot-loader" 329 | }, 330 | { 331 | test: /\.(html|xml)$/, 332 | use: "@nativescript/webpack/helpers/markup-hot-loader" 333 | }, 334 | 335 | { test: /\.(html|xml)$/, use: "@nativescript/webpack/helpers/xml-namespace-loader" } 336 | ); 337 | } 338 | 339 | if (report) { 340 | // Generate report files for bundles content 341 | config.plugins.push(new BundleAnalyzerPlugin({ 342 | analyzerMode: "static", 343 | openAnalyzer: false, 344 | generateStatsFile: true, 345 | reportFilename: resolve(projectRoot, "report", `report.html`), 346 | statsFilename: resolve(projectRoot, "report", `stats.json`), 347 | })); 348 | } 349 | 350 | if (snapshot) { 351 | config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({ 352 | chunk: "vendor", 353 | requireModules: [ 354 | "@nativescript/core/bundle-entry-points", 355 | ], 356 | projectRoot, 357 | webpackConfig: config, 358 | snapshotInDocker, 359 | skipSnapshotTools, 360 | useLibs 361 | })); 362 | } 363 | 364 | if (hmr) { 365 | config.plugins.push(new webpack.HotModuleReplacementPlugin()); 366 | } 367 | 368 | return config; 369 | }; 370 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo.gif -------------------------------------------------------------------------------- /demo/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | 9 | [*.json] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.ts] 14 | indent_style = tab 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # NativeScript Template 7 | *.js.map 8 | *.js 9 | !webpack.config.js 10 | 11 | # Logs 12 | logs 13 | *.log 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | 18 | # General 19 | .DS_Store 20 | .AppleDouble 21 | .LSOverride 22 | .idea 23 | .cloud 24 | .project 25 | tmp/ 26 | typings/ 27 | 28 | # Visual Studio Code 29 | .vscode/* 30 | !.vscode/settings.json 31 | !.vscode/tasks.json 32 | !.vscode/launch.json 33 | !.vscode/extensions.json 34 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // implementation 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | // If you want to add something to be applied before applying plugins' include.gradle files 9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1" 10 | // create a file named before-plugins.gradle in the current directory and place it there 11 | 12 | android { 13 | defaultConfig { 14 | minSdkVersion 17 15 | generatedDensities = [] 16 | } 17 | aaptOptions { 18 | additionalParameters "--no-version-vectors" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 28 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/values-v29/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "icon-29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "icon-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "icon-20.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "icon-20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "icon-29.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "icon-29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "icon-40.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "icon-40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "icon-76.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "icon-76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "icon-83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "icon-1024.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-AspectFill@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-Center@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jlooper/nativescript-paint/a9a8506943be9e04360b4d14b57bb362680884f3/demo/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png -------------------------------------------------------------------------------- /demo/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /demo/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /demo/App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | -------------------------------------------------------------------------------- /demo/nativescript.config.ts: -------------------------------------------------------------------------------- 1 | import { NativeScriptConfig } from '@nativescript/core'; 2 | 3 | export default { 4 | id: 'org.nativescript.demo', 5 | appResourcesPath: 'App_Resources', 6 | android: { 7 | v8Flags: '--expose_gc', 8 | markingMode: 'none' 9 | } 10 | } as NativeScriptConfig; -------------------------------------------------------------------------------- /demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nativescript/template-hello-world-ts", 3 | "main": "main.js", 4 | "version": "7.0.3", 5 | "author": "NativeScript Team ", 6 | "description": "NativeScript Application", 7 | "license": "SEE LICENSE IN ", 8 | "publishConfig": { 9 | "access": "public" 10 | }, 11 | "keywords": [ 12 | "nativescript", 13 | "mobile", 14 | "{N}", 15 | "template" 16 | ], 17 | "repository": "", 18 | "bugs": { 19 | "url": "https://github.com/NativeScript/NativeScript/issues" 20 | }, 21 | "homepage": "https://github.com/NativeScript/nativescript-app-templates", 22 | "dependencies": { 23 | "@nativescript/core": "~7.0.0", 24 | "@nativescript/theme": "~2.3.0", 25 | "nativescript-paint": "file:../src", 26 | "nativescript-color-picker": "^1.5.0" 27 | }, 28 | "devDependencies": { 29 | "@nativescript/android": "7.0.0", 30 | "@nativescript/types": "~7.0.0", 31 | "@nativescript/webpack": "~3.0.0", 32 | "typescript": "~3.9.0" 33 | }, 34 | "private": "true", 35 | "readme": "NativeScript Application" 36 | } 37 | -------------------------------------------------------------------------------- /demo/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /demo/src/app-root.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /demo/src/app.css: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.css file is where you place CSS rules that 3 | you would like to apply to your entire application. Check out 4 | http://docs.nativescript.org/ui/styling for a full list of the CSS 5 | selectors and properties you can use to style UI components. 6 | 7 | /* 8 | In many cases you may want to use the NativeScript core theme instead 9 | of writing your own CSS rules. You can learn more about the 10 | NativeScript core theme at https://github.com/nativescript/theme 11 | The imported CSS rules must precede all other types of rules. 12 | */ 13 | @import '~@nativescript/theme/css/core.css'; 14 | @import '~@nativescript/theme/css/default.css'; 15 | 16 | /* Place any CSS rules you want to apply on both iOS and Android here. 17 | This is where the vast majority of your CSS code goes. */ 18 | 19 | /* 20 | The following CSS rule changes the font size of all Buttons that have the 21 | '-primary' class modifier. 22 | */ 23 | Button.-primary { 24 | font-size: 18; 25 | } 26 | -------------------------------------------------------------------------------- /demo/src/main-page.ts: -------------------------------------------------------------------------------- 1 | import { EventData, Page } from '@nativescript/core'; 2 | import { HelloWorldModel } from './main-view-model'; 3 | import { isAndroid, Device } from '@nativescript/core/platform'; 4 | import { Color } from '@nativescript/core/color'; 5 | import { android } from '@nativescript/core/application'; 6 | 7 | // Event handler for Page "loaded" event attached in main-page.xml 8 | export function pageLoaded(args: EventData) { 9 | // Get the event sender 10 | var page = args.object; 11 | page.bindingContext = new HelloWorldModel(page); 12 | 13 | if (isAndroid && Device.sdkVersion >= '21') { 14 | let window = android.startActivity.getWindow(); 15 | window.setStatusBarColor(new Color('#336699').android); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /demo/src/main-page.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |