├── .github
└── issue_template.md
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── assets
├── cropperresultandroid.jpeg
├── cropperuiandroid.jpeg
└── cropperuiios.png
├── demo
├── .editorconfig
├── .gitignore
├── App_Resources
│ ├── Android
│ │ ├── app.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ ├── background.png
│ │ │ └── logo.png
│ │ │ ├── drawable-ldpi
│ │ │ ├── background.png
│ │ │ └── logo.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── background.png
│ │ │ └── logo.png
│ │ │ ├── drawable-nodpi
│ │ │ └── splash_screen.xml
│ │ │ ├── drawable-xhdpi
│ │ │ ├── background.png
│ │ │ └── logo.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── background.png
│ │ │ └── logo.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ ├── background.png
│ │ │ └── logo.png
│ │ │ ├── drawable
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ └── ic_launcher.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-v21
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ │ ├── values-v29
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── ic_launcher_background.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-root.xml
│ ├── app.css
│ ├── app.ts
│ ├── main-page.ts
│ ├── main-page.xml
│ ├── main-view-model.ts
│ ├── modal-page.ts
│ └── modal-page.xml
├── nativescript.config.ts
├── package-lock.json
├── package.json
├── references.d.ts
├── tsconfig.json
└── webpack.config.js
├── ns-ng-snippet
├── app.component.html
└── app.component.ts
├── ns-vue-snippet
└── vue-snippet.js
├── publish
├── pack.sh
├── package-lock.json
├── package.json
└── publish.sh
├── service-example
└── image-upload-service.js
├── src
├── .npmignore
├── imagecropper.android.ts
├── imagecropper.ios.ts
├── index.d.ts
├── package-lock.json
├── package.json
├── platforms
│ ├── android
│ │ ├── AndroidManifest.xml
│ │ ├── include.gradle
│ │ └── nativescript_imagecropper.aar
│ └── ios
│ │ └── Podfile
├── references.d.ts
├── tsconfig.json
└── typings
│ ├── java!ucrop.d.ts
│ └── objc!TOCropViewController.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/@nativescript/core/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 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode
2 | .idea
3 | .DS_Store
4 | *.js
5 | !ns-vue-snippet/vue-snippet.js
6 | !service-example/*.js
7 | *.js.map
8 | *.log
9 | src/*.d.ts
10 | !src/index.d.ts
11 | !src/references.d.ts
12 | !src/scripts/*.js
13 | !seed-tests/*.js
14 | seed-tests/seed-copy/**/*.*
15 | seed-tests/seed-copy-new-git-repo/**/*.*
16 | !demo/karma.conf.js
17 | !demo/app/tests/*.js
18 | demo/*.d.ts
19 | !demo/references.d.ts
20 | !demo/webpack.config.js
21 | demo/lib
22 | demo/platforms
23 | node_modules
24 | publish/src
25 | publish/package
26 | demo/report/report.html
27 | demo/report/stats.json
28 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | matrix:
2 | include:
3 | - stage: "Lint"
4 | language: node_js
5 | os: linux
6 | node_js: "6"
7 | script: cd src && npm run ci.tslint && cd ../demo && npm run ci.tslint
8 | - stage: "WebPack"
9 | os: osx
10 | env:
11 | - Platform="iOS"
12 | osx_image: xcode8.3
13 | language: node_js
14 | node_js: "6"
15 | jdk: oraclejdk8
16 | script: cd demo && npm run build.plugin && npm i && npm run build-ios-bundle
17 | - language: android
18 | os: linux
19 | env:
20 | - Platform="Android"
21 | jdk: oraclejdk8
22 | before_install: nvm install 6.10.3
23 | script: cd demo && npm run build.plugin && npm i && npm run build-android-bundle
24 | - stage: "Build and Test"
25 | env:
26 | - BuildAndroid="25"
27 | language: android
28 | os: linux
29 | jdk: oraclejdk8
30 | before_install: nvm install stable
31 | script:
32 | - cd src && npm i && npm run tsc && cd ../demo && tns build android
33 | - os: osx
34 | env:
35 | - BuildiOS="10.3"
36 | - Xcode="8.3"
37 | osx_image: xcode8.3
38 | language: node_js
39 | node_js: "6"
40 | jdk: oraclejdk8
41 | script:
42 | - cd src && npm i && npm run tsc && cd ../demo && tns build ios
43 | - os: linux
44 | language: android
45 | dist: precise
46 | sudo: required
47 | jdk: oraclejdk8
48 | before_script:
49 | - echo no | android create avd --force -n test -t android-21 -b armeabi-v7a
50 | - emulator -avd test -no-audio -no-window &
51 | - android-wait-for-emulator
52 | before_install:
53 | - nvm install 6
54 | script: cd src && npm run test.android
55 | - os: osx
56 | language: node_js
57 | node_js: "6"
58 | jdk: oraclejdk8
59 | osx_image: xcode8.3
60 | script: cd src && npm run test.ios
61 |
62 | android:
63 | components:
64 | - tools
65 | - platform-tools
66 | - build-tools-25.0.2
67 | - android-25
68 | - extra-android-m2repository
69 | - sys-img-armeabi-v7a-android-21
70 |
71 | install:
72 | - echo no | npm install -g nativescript
73 | - tns usage-reporting disable
74 | - tns error-reporting disable
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | nativescript-imagecropper
4 | Copyright (c) 2017, Brian Thurlow and Shiva Prasad
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | this software and associated documentation files (the "Software"), to deal in
8 | the Software without restriction, including without limitation the rights to
9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10 | the Software, and to permit persons to whom the Software is furnished to do so,
11 | subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
7 |
8 | # A {N} Image Cropping Plugin
9 |
10 | [](http://choosealicense.com/licenses/mit/)
11 | [](https://www.npmjs.com/package/nativescript-imagecropper) [](https://www.npmjs.com/package/nativescript-imagecropper) [](https://github.com/bthurlow/nativescript-imagecropper)
12 |
13 | ## Notes
14 |
15 | iOS 8+
16 |
17 | Android 17+
18 |
19 | v2.0.0+ the version of Android Lib has changed and the cropper looks different now,
20 | hence the breaking change
21 |
22 | ### Based on
23 |
24 | [TOCropViewController](https://github.com/TimOliver/TOCropViewController) for iOS
25 |
26 | [uCrop](https://github.com/Yalantis/uCrop) for Android
27 |
28 | ## Installation
29 |
30 | ### NativeScript 7+:
31 | Run `ns plugin add nativescript-imagecropper`
32 |
33 | ### NativeScript below 7:
34 | Run `tns plugin add nativescript-imagecropper@3.0.0`
35 |
36 | ## Screenshots
37 |
38 | ### Cropper UI & End result (android)
39 |
40 |
41 | ### Cropper UI (iOS)
42 |
43 |
44 | ### Usage (for TS demo, please see the demo folder)
45 |
46 | To use the image cropping module you must first require it.
47 |
48 | ```js
49 | var ImageCropper = require("nativescript-imagecropper").ImageCropper;
50 | ```
51 |
52 | ### How to get the image source, from nativescript-camera plugin
53 | ```js
54 | var camera = require("nativescript-camera");
55 |
56 | // You might want to request camera permissions first
57 | // check demo folder for sample implementation
58 |
59 | camera.takePicture({width:300,height:300,keepAspectRatio:true})
60 | .then((imageAsset) => {
61 | let source = new imageSource.ImageSource();
62 | source.fromAsset(imageAsset).then((source) => {
63 | // now you have the image source
64 | // pass it to the cropper
65 | // recommend using setTimeout like this
66 | setTimeout(() => {
67 | // on iOS we want a timeout of 1second as it takes time before
68 | // the imageSource is ready to be read by the plugin
69 | }, isAndroid ? 0 : 1000);
70 | });
71 | }).catch((err) => {
72 | console.log("Error -> " + err.message);
73 | });
74 | ```
75 |
76 | ### Methods
77 |
78 | `show(ImageSource)`: Returns a cropped ImageSource
79 |
80 | ```js
81 | var imageCropper = new ImageCropper();
82 | imageCropper.show(imageSource).then((args) => {
83 | console.dir(args);
84 | if(args.image !== null){
85 | imageView.imageSource = args.image;
86 | }
87 | })
88 | .catch(function(e){
89 | console.dir(e);
90 | });
91 | ```
92 |
93 | `show(ImageSource,Options)`: Returns a cropped and resized ImageSource
94 |
95 | ```js
96 | var imageCropper = new ImageCropper();
97 | imageCropper.show(imageSource,{width:300,height:300}).then((args) => {
98 | console.dir(args);
99 | if(args.image !== null){
100 | imageView.imageSource = args.image;
101 | }
102 | })
103 | .catch(function(e){
104 | console.dir(e);
105 | });
106 | ```
107 |
108 | ### Options
109 |
110 | Option | Type | Description
111 | ------ | ------ | ------------------------------------------------
112 | width | number | The width of the image you would like returned.
113 | height | number | The height of the image you would like returned.
114 | lockSquare | boolean | Pass this as true, to lock square aspect ratio on iOS, on android, this option doesn't make any difference.
115 | circularCrop | boolean | Pass this as true, to crop a circular image on iOS, on android, this options shows a circular mask while cropping, but returns a rectangular image.
116 |
117 | ### Android Config
118 |
119 | ```ts
120 | export interface OptionsAndroid {
121 | isFreeStyleCropEnabled?: boolean; // set to true to let user resize crop bounds (disabled by default)
122 | toolbarTitle?: string; // default 'Crop Image'
123 | toolbarTextColor?: string; // desired resolved color of Toolbar text and buttons (default is darker orange)
124 | toolbarColor?: string; // desired resolved color of the toolbar
125 | rootViewBackgroundColor?: string; // desired background color that should be applied to the root view
126 | logoColor?: string; // desired resolved color of logo fill (default is darker grey)
127 | statusBarColor?: string; // Set statusbar color
128 | showCropGrid?: boolean; // set to true if you want to see a crop grid/guidelines on top of an image
129 | showCropFrame?: boolean; // set to true if you want to see a crop frame rectangle on top of an image
130 | cropFrameStrokeWidth?: number; // desired width of crop frame line in pixels
131 | cropGridStrokeWidth?: number; // desired width of crop grid lines in pixels
132 | cropGridColor?: string; // desired color of crop grid/guidelines
133 | cropFrameColor?: string; // desired color of crop frame
134 | cropGridRowCount?: number; // crop grid rows count
135 | cropGridColumnCount?: number; // crop grid columns count
136 | hideBottomControls?: boolean; // set to true to hide the bottom controls (shown by default)
137 | compressionQuality?: number; // Set compression quality [0-100] that will be used to save resulting Bitmap
138 | dimmedLayerColor?: string; // desired color of dimmed area around the crop bounds
139 | setAspectRatioOptions?: AspectRatioOptions; // Pass an ordered list of desired aspect ratios that should be available for a user.
140 | toolbarCropDrawable?: any; // Android Drawable (pass native drawable object ONLY)
141 | toolbarCancelDrawable?: any; // Android Drawable (pass native drawable object ONLY)
142 | }
143 |
144 | export interface AspectRatio {
145 | aspectRatioTitle: string,
146 | aspectRatioX: number,
147 | aspectRatioY: number;
148 | }
149 |
150 | export interface AspectRatioOptions {
151 | defaultIndex: number;
152 | aspectRatios: AspectRatio[]
153 | }
154 |
155 | // example aspectRatio options
156 | setAspectRatioOptions: {
157 | defaultIndex: 0,
158 | aspectRatios: [
159 | {
160 | aspectRatioTitle: '1:1',
161 | aspectRatioX: 1,
162 | aspectRatioY: 1
163 | },
164 | {
165 | aspectRatioTitle: '16:9',
166 | aspectRatioX: 16,
167 | aspectRatioY: 9
168 | },
169 | {
170 | aspectRatioTitle: '18:9',
171 | aspectRatioX: 18,
172 | aspectRatioY: 9
173 | }
174 | ]
175 | }
176 | ```
177 |
178 | ### Additional notes for Android
179 |
180 | You can override library colors just specifying colors with the same names in your colors.xml file.
181 | For example:
182 |
183 | ```xml
184 | #000000
185 | ```
186 |
187 | This will make toolbar color black if specified inside your `App_Resources/Android/values/colors.xml` file.
188 |
189 | #### Android styles to customize the cropper activity/styles
190 |
191 | ``` xml
192 |
193 | #FF6E40
194 | #CC5833
195 | #fff
196 | #000
197 | #FF6E40
198 | #fff
199 | #000
200 | #808080
201 | #000
202 |
203 |
204 | #80ffffff
205 | #ffffff
206 | #8c000000
207 | #4f212121
208 | ```
209 |
210 | ### Returned Result Arguments
211 |
212 | Argument | Type | Result(s)
213 | -------- | ----------- | --------------------------------------------------------------------------
214 | response | string | Success
Cancelled
Error
215 | image | ImageSource | `null` if there was an error or was cancelled
`ImageSource` on success
216 |
217 | ### Bonus: Snippet for using with nativescript-imagepicker 6.x
218 |
219 | ```js
220 | const context = imagepickerModule.create({
221 | mode: 'single' // allow choosing single image
222 | });
223 | context
224 | .authorize()
225 | .then(function() {
226 | return context.present();
227 | })
228 | .then(function(selection) {
229 | selection.forEach(function(selected) {
230 | selected.getImageAsync(source => {
231 | if (source) {
232 | const selectedImgSource = imageSource.fromNativeSource(source);
233 | imageCropper
234 | .show(selectedImgSource, { width: 500, height: 500 })
235 | .then(args => {
236 | if (args.image !== null) {
237 | // Use args.image
238 | }
239 | })
240 | .catch(function(e) {
241 | console.log(e);
242 | });
243 | }
244 | });
245 | });
246 | })
247 | .catch(function(e) {
248 | console.log(e);
249 | });
250 | ```
251 |
--------------------------------------------------------------------------------
/assets/cropperresultandroid.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/assets/cropperresultandroid.jpeg
--------------------------------------------------------------------------------
/assets/cropperuiandroid.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/assets/cropperuiandroid.jpeg
--------------------------------------------------------------------------------
/assets/cropperuiios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/assets/cropperuiios.png
--------------------------------------------------------------------------------
/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 | [*.js]
14 | indent_style = space
15 | indent_size = 2
16 |
17 | [*.ts]
18 | indent_style = space
19 | indent_size = 2
--------------------------------------------------------------------------------
/demo/.gitignore:
--------------------------------------------------------------------------------
1 | # NativeScript
2 | hooks/
3 | node_modules/
4 | platforms/
5 |
6 | # Logs
7 | logs
8 | *.log
9 | npm-debug.log*
10 | yarn-debug.log*
11 | yarn-error.log*
12 |
13 | # General
14 | .DS_Store
15 | .AppleDouble
16 | .LSOverride
17 | .idea
18 | .cloud
19 | .project
20 | tmp/
21 | typings/
22 |
23 | # Visual Studio Code
24 | .vscode/*
25 | !.vscode/settings.json
26 | !.vscode/tasks.json
27 | !.vscode/launch.json
28 | !.vscode/extensions.json
29 |
--------------------------------------------------------------------------------
/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 |
18 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
6 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/demo/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #65ADF1
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 | #65ADF1
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo/App_Resources/Android/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/demo/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/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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/bthurlow/nativescript-imagecropper/c69097e31ccb951cd3f619c4080fa2528b30e28a/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 you need to specify your development team.
5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID;
6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
7 |
--------------------------------------------------------------------------------
/demo/app/app-root.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/demo/app/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 |
27 | .title {
28 | horizontal-align: center;
29 | margin: 20;
30 | }
31 |
--------------------------------------------------------------------------------
/demo/app/app.ts:
--------------------------------------------------------------------------------
1 | /*
2 | In NativeScript, the app.ts file is the entry point to your application.
3 | You can use this file to perform app-level initialization, but the primary
4 | purpose of the file is to pass control to the app’s first module.
5 | */
6 |
7 | import { Application } from '@nativescript/core'
8 |
9 | Application.run({ moduleName: 'app-root' })
10 |
11 | /*
12 | Do not place any code after the application has been started as it will not
13 | be executed on iOS.
14 | */
15 |
--------------------------------------------------------------------------------
/demo/app/main-page.ts:
--------------------------------------------------------------------------------
1 | import { Button, EventData, Page, ShowModalOptions } from '@nativescript/core';
2 | import { ImageCropperModel } from './main-view-model';
3 |
4 | // Event handler for Page 'loaded' event attached in main-page.xml
5 | export function pageLoaded(args: EventData) {
6 | // Get the event sender
7 | const page = args.object;
8 | page.bindingContext = new ImageCropperModel(page, 'croppedImage');
9 | }
10 |
11 | export function openModal(args) {
12 | const mainView: Button =