├── .gitignore
├── .prettierrc
├── README.md
├── demo
├── app
│ ├── App_Resources
│ │ ├── Android
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── app.gradle
│ │ │ ├── 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
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ └── iOS
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── icon-29.png
│ │ │ │ ├── icon-29@2x.png
│ │ │ │ ├── icon-29@3x.png
│ │ │ │ ├── icon-40.png
│ │ │ │ ├── icon-40@2x.png
│ │ │ │ ├── icon-40@3x.png
│ │ │ │ ├── icon-50.png
│ │ │ │ ├── icon-50@2x.png
│ │ │ │ ├── icon-57.png
│ │ │ │ ├── icon-57@2x.png
│ │ │ │ ├── icon-60@2x.png
│ │ │ │ ├── icon-60@3x.png
│ │ │ │ ├── icon-72.png
│ │ │ │ ├── icon-72@2x.png
│ │ │ │ ├── icon-76.png
│ │ │ │ ├── icon-76@2x.png
│ │ │ │ └── icon-83.5@2x.png
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.launchimage
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Default-568h@2x.png
│ │ │ │ ├── Default-667h@2x.png
│ │ │ │ ├── Default-736h@3x.png
│ │ │ │ ├── Default-Landscape.png
│ │ │ │ ├── Default-Landscape@2x.png
│ │ │ │ ├── Default-Landscape@3x.png
│ │ │ │ ├── Default-Portrait.png
│ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ ├── Default.png
│ │ │ │ └── Default@2x.png
│ │ │ ├── LaunchScreen.AspectFill.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ └── LaunchScreen-AspectFill@2x.png
│ │ │ └── LaunchScreen.Center.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ └── LaunchScreen-Center@2x.png
│ │ │ ├── Info.plist
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── build.xcconfig
│ ├── app.css
│ ├── app.js
│ ├── app.ts
│ ├── images
│ │ ├── greyHeart.png
│ │ └── twitterHeart.png
│ ├── main-page.js
│ ├── main-page.ts
│ ├── main-page.xml
│ └── package.json
├── package.json
└── tsconfig.json
├── images
├── nstudio-banner.png
└── twitterBang.gif
└── src
├── .npmignore
├── LICENSE
├── index.d.ts
├── package.json
├── platforms
└── android
│ └── include.gradle
├── references.d.ts
├── tsconfig.json
├── twitterbang.android.ts
├── twitterbang.common.ts
└── twitterbang.ios.ts
/.gitignore:
--------------------------------------------------------------------------------
1 | *.js
2 | !demo/*.js
3 | *.js.map
4 | *.log
5 | *.d.ts
6 | !src/index.d.ts
7 | !src/references.d.ts
8 | demo/lib
9 | demo/*.d.ts
10 | demo/platforms
11 | demo/node_modules
12 | demo/.vscode
13 | node_modules
14 | .vscode/
15 | *.DS_Store
16 |
17 | # User-specific files
18 | *.suo
19 | *.user
20 | *.userosscache
21 | *.sln.docstates
22 | *.sln
23 | .sln
24 | nativescript-twitterbang.sln
25 |
26 | # User-specific files (MonoDevelop/Xamarin Studio)
27 | *.userprefs
28 |
29 | # Build results
30 | [Dd]ebug/
31 | [Dd]ebugPublic/
32 | [Rr]elease/
33 | [Rr]eleases/
34 | x64/
35 | x86/
36 | bld/
37 | [Bb]in/
38 | [Oo]bj/
39 |
40 | # Visual Studio 2015 cache/options directory
41 | .vs/
42 | # Uncomment if you have tasks that create the project's static files in wwwroot
43 | #wwwroot/
44 |
45 | # MSTest test Results
46 | [Tt]est[Rr]esult*/
47 | [Bb]uild[Ll]og.*
48 |
49 | # NUNIT
50 | *.VisualState.xml
51 | TestResult.xml
52 |
53 | # Build Results of an ATL Project
54 | [Dd]ebugPS/
55 | [Rr]eleasePS/
56 | dlldata.c
57 |
58 | # DNX
59 | project.lock.json
60 | artifacts/
61 |
62 | *_i.c
63 | *_p.c
64 | *_i.h
65 | *.ilk
66 | *.meta
67 | *.obj
68 | *.pch
69 | *.pdb
70 | *.pgc
71 | *.pgd
72 | *.rsp
73 | *.sbr
74 | *.tlb
75 | *.tli
76 | *.tlh
77 | *.tmp
78 | *.tmp_proj
79 | *.log
80 | *.vspscc
81 | *.vssscc
82 | .builds
83 | *.pidb
84 | *.svclog
85 | *.scc
86 |
87 | # Chutzpah Test files
88 | _Chutzpah*
89 |
90 | # Visual C++ cache files
91 | ipch/
92 | *.aps
93 | *.ncb
94 | *.opendb
95 | *.opensdf
96 | *.sdf
97 | *.cachefile
98 |
99 | # Visual Studio profiler
100 | *.psess
101 | *.vsp
102 | *.vspx
103 | *.sap
104 |
105 | # TFS 2012 Local Workspace
106 | $tf/
107 |
108 | # Guidance Automation Toolkit
109 | *.gpState
110 |
111 | # ReSharper is a .NET coding add-in
112 | _ReSharper*/
113 | *.[Rr]e[Ss]harper
114 | *.DotSettings.user
115 |
116 | # JustCode is a .NET coding add-in
117 | .JustCode
118 |
119 | # TeamCity is a build add-in
120 | _TeamCity*
121 |
122 | # DotCover is a Code Coverage Tool
123 | *.dotCover
124 |
125 | # NCrunch
126 | _NCrunch_*
127 | .*crunch*.local.xml
128 | nCrunchTemp_*
129 |
130 | # MightyMoose
131 | *.mm.*
132 | AutoTest.Net/
133 |
134 | # Web workbench (sass)
135 | .sass-cache/
136 |
137 | # Installshield output folder
138 | [Ee]xpress/
139 |
140 | # DocProject is a documentation generator add-in
141 | DocProject/buildhelp/
142 | DocProject/Help/*.HxT
143 | DocProject/Help/*.HxC
144 | DocProject/Help/*.hhc
145 | DocProject/Help/*.hhk
146 | DocProject/Help/*.hhp
147 | DocProject/Help/Html2
148 | DocProject/Help/html
149 |
150 | # Click-Once directory
151 | publish/
152 |
153 | # Publish Web Output
154 | *.[Pp]ublish.xml
155 | *.azurePubxml
156 | # TODO: Comment the next line if you want to checkin your web deploy settings
157 | # but database connection strings (with potential passwords) will be unencrypted
158 | *.pubxml
159 | *.publishproj
160 |
161 | # NuGet Packages
162 | *.nupkg
163 | # The packages folder can be ignored because of Package Restore
164 | **/packages/*
165 | # except build/, which is used as an MSBuild target.
166 | !**/packages/build/
167 | # Uncomment if necessary however generally it will be regenerated when needed
168 | #!**/packages/repositories.config
169 | # NuGet v3's project.json files produces more ignoreable files
170 | *.nuget.props
171 | *.nuget.targets
172 |
173 | # Microsoft Azure Build Output
174 | csx/
175 | *.build.csdef
176 |
177 | # Microsoft Azure Emulator
178 | ecf/
179 | rcf/
180 |
181 | # Microsoft Azure ApplicationInsights config file
182 | ApplicationInsights.config
183 |
184 | # Windows Store app package directory
185 | AppPackages/
186 | BundleArtifacts/
187 |
188 | # Visual Studio cache files
189 | # files ending in .cache can be ignored
190 | *.[Cc]ache
191 | # but keep track of directories ending in .cache
192 | !*.[Cc]ache/
193 |
194 | # Others
195 | ClientBin/
196 | ~$*
197 | *~
198 | *.dbmdl
199 | *.dbproj.schemaview
200 | *.pfx
201 | *.publishsettings
202 | node_modules/
203 | orleans.codegen.cs
204 |
205 | # RIA/Silverlight projects
206 | Generated_Code/
207 |
208 | # Backup & report files from converting an old project file
209 | # to a newer Visual Studio version. Backup files are not needed,
210 | # because we have git ;-)
211 | _UpgradeReport_Files/
212 | Backup*/
213 | UpgradeLog*.XML
214 | UpgradeLog*.htm
215 |
216 | # SQL Server files
217 | *.mdf
218 | *.ldf
219 |
220 | # Business Intelligence projects
221 | *.rdl.data
222 | *.bim.layout
223 | *.bim_*.settings
224 |
225 | # Microsoft Fakes
226 | FakesAssemblies/
227 |
228 | # GhostDoc plugin setting file
229 | *.GhostDoc.xml
230 |
231 | # Node.js Tools for Visual Studio
232 | .ntvs_analysis.dat
233 |
234 | # Visual Studio 6 build log
235 | *.plg
236 |
237 | # Visual Studio 6 workspace options file
238 | *.opt
239 |
240 | # Visual Studio LightSwitch build output
241 | **/*.HTMLClient/GeneratedArtifacts
242 | **/*.DesktopClient/GeneratedArtifacts
243 | **/*.DesktopClient/ModelManifest.xml
244 | **/*.Server/GeneratedArtifacts
245 | **/*.Server/ModelManifest.xml
246 | _Pvt_Extensions
247 |
248 | # Paket dependency manager
249 | .paket/paket.exe
250 |
251 | # FAKE - F# Make
252 | .fake/
253 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "semi": true,
4 | "printWidth": 120
5 | }
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | NativeScript-TwitterBang
3 |
4 |
NativeScript plugin for Android to use native Twitter animation for the exploding heart. This library uses SmallBang by hanks-zyh for the native animation.
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
Do you need assistance on your project or plugin? Contact the nStudio team anytime at team@nstudio.io to get up to speed with the best practices in mobile and web app development.
29 |
30 |
31 |
32 | ---
33 |
34 | ### TwitterBang Usage
35 |
36 | 
37 |
38 | ## Installation
39 |
40 | `tns plugin add nativescript-twitterbang`
41 |
42 | ## Notice
43 |
44 | As of version 2.0.0, the native library has been updated and the plugin, the API is brand new and breaking.
45 | The `TwitterBang` is not a layout container, similar to `StackLayout, GridLayout` so you can place some UI inside the `TwitterBang` layout. You have to be careful with the layout sizing/position or the animation will be 'jumpy' because of the actual layout size. See the demo markup, usually some alignment of the inner content will solve any 'jumpy' animation by centering the inner content.
46 |
47 | ## Usage
48 |
49 | ### XML:
50 |
51 | ```XML
52 |
53 |
54 |
55 |
56 |
57 |
58 | ```
59 |
60 | ### TS:
61 |
62 | ```typescript
63 | import { TwitterBang } from 'nativescript-twitterbang';
64 |
65 | // args.object is the View/component that triggered the tap event
66 | public bangThis(args) {
67 | const tb = args.object as TwitterBang;
68 | tb.bang().then(() => {
69 | console.log('do something after the effect');
70 | })
71 | }
72 | ```
73 |
74 | ### JS:
75 |
76 | ```javascript
77 | // args.object is the View/component that triggered the tap event
78 | export function bangThis(args) {
79 | const x = args.object;
80 | x.bang().then(function() {
81 | console.log('after the bang');
82 | });
83 | }
84 | ```
85 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // compile 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | android {
9 | defaultConfig {
10 | generatedDensities = []
11 | applicationId = "org.nativescript.twitterbang"
12 | }
13 | aaptOptions {
14 | additionalParameters "--no-version-vectors"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/Android/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
21 |
22 |
23 |
31 |
32 |
34 |
35 |
36 |
42 |
43 |
45 |
46 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "icon-29.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "icon-29@2x.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29@3x.png",
19 | "scale" : "3x"
20 | },
21 | {
22 | "size" : "40x40",
23 | "idiom" : "iphone",
24 | "filename" : "icon-40@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "icon-40@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "57x57",
35 | "idiom" : "iphone",
36 | "filename" : "icon-57.png",
37 | "scale" : "1x"
38 | },
39 | {
40 | "size" : "57x57",
41 | "idiom" : "iphone",
42 | "filename" : "icon-57@2x.png",
43 | "scale" : "2x"
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" : "29x29",
59 | "idiom" : "ipad",
60 | "filename" : "icon-29.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "29x29",
65 | "idiom" : "ipad",
66 | "filename" : "icon-29@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "40x40",
71 | "idiom" : "ipad",
72 | "filename" : "icon-40.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "40x40",
77 | "idiom" : "ipad",
78 | "filename" : "icon-40@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "50x50",
83 | "idiom" : "ipad",
84 | "filename" : "icon-50.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "50x50",
89 | "idiom" : "ipad",
90 | "filename" : "icon-50@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "72x72",
95 | "idiom" : "ipad",
96 | "filename" : "icon-72.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "72x72",
101 | "idiom" : "ipad",
102 | "filename" : "icon-72@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "76x76",
107 | "idiom" : "ipad",
108 | "filename" : "icon-76.png",
109 | "scale" : "1x"
110 | },
111 | {
112 | "size" : "76x76",
113 | "idiom" : "ipad",
114 | "filename" : "icon-76@2x.png",
115 | "scale" : "2x"
116 | },
117 | {
118 | "size" : "83.5x83.5",
119 | "idiom" : "ipad",
120 | "filename" : "icon-83.5@2x.png",
121 | "scale" : "2x"
122 | }
123 | ],
124 | "info" : {
125 | "version" : 1,
126 | "author" : "xcode"
127 | }
128 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "extent" : "full-screen",
5 | "idiom" : "iphone",
6 | "subtype" : "736h",
7 | "filename" : "Default-736h@3x.png",
8 | "minimum-system-version" : "8.0",
9 | "orientation" : "portrait",
10 | "scale" : "3x"
11 | },
12 | {
13 | "extent" : "full-screen",
14 | "idiom" : "iphone",
15 | "subtype" : "736h",
16 | "filename" : "Default-Landscape@3x.png",
17 | "minimum-system-version" : "8.0",
18 | "orientation" : "landscape",
19 | "scale" : "3x"
20 | },
21 | {
22 | "extent" : "full-screen",
23 | "idiom" : "iphone",
24 | "subtype" : "667h",
25 | "filename" : "Default-667h@2x.png",
26 | "minimum-system-version" : "8.0",
27 | "orientation" : "portrait",
28 | "scale" : "2x"
29 | },
30 | {
31 | "orientation" : "portrait",
32 | "idiom" : "iphone",
33 | "filename" : "Default@2x.png",
34 | "extent" : "full-screen",
35 | "minimum-system-version" : "7.0",
36 | "scale" : "2x"
37 | },
38 | {
39 | "extent" : "full-screen",
40 | "idiom" : "iphone",
41 | "subtype" : "retina4",
42 | "filename" : "Default-568h@2x.png",
43 | "minimum-system-version" : "7.0",
44 | "orientation" : "portrait",
45 | "scale" : "2x"
46 | },
47 | {
48 | "orientation" : "portrait",
49 | "idiom" : "ipad",
50 | "filename" : "Default-Portrait.png",
51 | "extent" : "full-screen",
52 | "minimum-system-version" : "7.0",
53 | "scale" : "1x"
54 | },
55 | {
56 | "orientation" : "landscape",
57 | "idiom" : "ipad",
58 | "filename" : "Default-Landscape.png",
59 | "extent" : "full-screen",
60 | "minimum-system-version" : "7.0",
61 | "scale" : "1x"
62 | },
63 | {
64 | "orientation" : "portrait",
65 | "idiom" : "ipad",
66 | "filename" : "Default-Portrait@2x.png",
67 | "extent" : "full-screen",
68 | "minimum-system-version" : "7.0",
69 | "scale" : "2x"
70 | },
71 | {
72 | "orientation" : "landscape",
73 | "idiom" : "ipad",
74 | "filename" : "Default-Landscape@2x.png",
75 | "extent" : "full-screen",
76 | "minimum-system-version" : "7.0",
77 | "scale" : "2x"
78 | },
79 | {
80 | "orientation" : "portrait",
81 | "idiom" : "iphone",
82 | "filename" : "Default.png",
83 | "extent" : "full-screen",
84 | "scale" : "1x"
85 | },
86 | {
87 | "orientation" : "portrait",
88 | "idiom" : "iphone",
89 | "filename" : "Default@2x.png",
90 | "extent" : "full-screen",
91 | "scale" : "2x"
92 | },
93 | {
94 | "orientation" : "portrait",
95 | "idiom" : "iphone",
96 | "filename" : "Default-568h@2x.png",
97 | "extent" : "full-screen",
98 | "subtype" : "retina4",
99 | "scale" : "2x"
100 | },
101 | {
102 | "orientation" : "portrait",
103 | "idiom" : "ipad",
104 | "extent" : "to-status-bar",
105 | "scale" : "1x"
106 | },
107 | {
108 | "orientation" : "portrait",
109 | "idiom" : "ipad",
110 | "filename" : "Default-Portrait.png",
111 | "extent" : "full-screen",
112 | "scale" : "1x"
113 | },
114 | {
115 | "orientation" : "landscape",
116 | "idiom" : "ipad",
117 | "extent" : "to-status-bar",
118 | "scale" : "1x"
119 | },
120 | {
121 | "orientation" : "landscape",
122 | "idiom" : "ipad",
123 | "filename" : "Default-Landscape.png",
124 | "extent" : "full-screen",
125 | "scale" : "1x"
126 | },
127 | {
128 | "orientation" : "portrait",
129 | "idiom" : "ipad",
130 | "extent" : "to-status-bar",
131 | "scale" : "2x"
132 | },
133 | {
134 | "orientation" : "portrait",
135 | "idiom" : "ipad",
136 | "filename" : "Default-Portrait@2x.png",
137 | "extent" : "full-screen",
138 | "scale" : "2x"
139 | },
140 | {
141 | "orientation" : "landscape",
142 | "idiom" : "ipad",
143 | "extent" : "to-status-bar",
144 | "scale" : "2x"
145 | },
146 | {
147 | "orientation" : "landscape",
148 | "idiom" : "ipad",
149 | "filename" : "Default-Landscape@2x.png",
150 | "extent" : "full-screen",
151 | "scale" : "2x"
152 | }
153 | ],
154 | "info" : {
155 | "version" : 1,
156 | "author" : "xcode"
157 | }
158 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
--------------------------------------------------------------------------------
/demo/app/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 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo/app/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 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo/app/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/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 |
--------------------------------------------------------------------------------
/demo/app/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 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
5 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
6 |
--------------------------------------------------------------------------------
/demo/app/app.css:
--------------------------------------------------------------------------------
1 | .title {
2 | font-size: 26;
3 | horizontal-align: center;
4 | margin: 20;
5 | }
6 |
7 | button {
8 | font-size: 18;
9 | horizontal-align: center;
10 | }
11 |
12 | .message {
13 | font-size: 20;
14 | color: #284848;
15 | horizontal-align: center;
16 | }
17 |
18 | .sub {
19 | font-size:14;
20 | horizontal-align:center;
21 | }
22 |
23 | .tiny {
24 | font-size:10;
25 | horizontal-align:center;
26 | }
27 |
28 | .center {
29 | horizontal-align: center;
30 | vertical-align: middle;
31 | }
--------------------------------------------------------------------------------
/demo/app/app.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var application = require("tns-core-modules/application");
4 | application.start({ moduleName: 'main-page' });
5 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMERBQTREO0FBQzVELFdBQVcsQ0FBQyxLQUFLLENBQUMsRUFBRSxVQUFVLEVBQUUsV0FBVyxFQUFFLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIGFwcGxpY2F0aW9uIGZyb20gJ3Rucy1jb3JlLW1vZHVsZXMvYXBwbGljYXRpb24nO1xuYXBwbGljYXRpb24uc3RhcnQoeyBtb2R1bGVOYW1lOiAnbWFpbi1wYWdlJyB9KTtcbiJdfQ==
--------------------------------------------------------------------------------
/demo/app/app.ts:
--------------------------------------------------------------------------------
1 | import * as application from 'tns-core-modules/application';
2 | application.start({ moduleName: 'main-page' });
3 |
--------------------------------------------------------------------------------
/demo/app/images/greyHeart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/images/greyHeart.png
--------------------------------------------------------------------------------
/demo/app/images/twitterHeart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/demo/app/images/twitterHeart.png
--------------------------------------------------------------------------------
/demo/app/main-page.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | var app = require("tns-core-modules/application");
4 | var platform_1 = require("tns-core-modules/platform");
5 | var color_1 = require("tns-core-modules/color");
6 | function pageLoaded(args) {
7 | var page = args.object;
8 | if (app.android && platform_1.device.sdkVersion >= '21') {
9 | var window_1 = app.android.startActivity.getWindow();
10 | window_1.setStatusBarColor(new color_1.Color('#D50000').android);
11 | }
12 | }
13 | exports.pageLoaded = pageLoaded;
14 | function bangThis(args) {
15 | try {
16 | var x = args.object;
17 | console.log('twitterbang x', x);
18 | console.log(x.dotColors);
19 | x.bang().then(function () {
20 | console.log('bang then');
21 | });
22 | }
23 | catch (e) {
24 | console.log(e);
25 | }
26 | }
27 | exports.bangThis = bangThis;
28 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi1wYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsibWFpbi1wYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsa0RBQW9EO0FBQ3BELHNEQUFtRDtBQUNuRCxnREFBK0M7QUFHL0Msb0JBQTJCLElBQUk7SUFDN0IsSUFBTSxJQUFJLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQztJQUV6QixJQUFJLEdBQUcsQ0FBQyxPQUFPLElBQUksaUJBQU0sQ0FBQyxVQUFVLElBQUksSUFBSSxFQUFFO1FBQzVDLElBQU0sUUFBTSxHQUFHLEdBQUcsQ0FBQyxPQUFPLENBQUMsYUFBYSxDQUFDLFNBQVMsRUFBRSxDQUFDO1FBQ3JELFFBQU0sQ0FBQyxpQkFBaUIsQ0FBQyxJQUFJLGFBQUssQ0FBQyxTQUFTLENBQUMsQ0FBQyxPQUFPLENBQUMsQ0FBQztLQUN4RDtBQUNILENBQUM7QUFQRCxnQ0FPQztBQUVELGtCQUF5QixJQUFJO0lBQzNCLElBQUk7UUFDRixJQUFNLENBQUMsR0FBRyxJQUFJLENBQUMsTUFBcUIsQ0FBQztRQUNyQyxPQUFPLENBQUMsR0FBRyxDQUFDLGVBQWUsRUFBRSxDQUFDLENBQUMsQ0FBQztRQUNoQyxPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUMsQ0FBQztRQUV6QixDQUFDLENBQUMsSUFBSSxFQUFFLENBQUMsSUFBSSxDQUFDO1lBQ1osT0FBTyxDQUFDLEdBQUcsQ0FBQyxXQUFXLENBQUMsQ0FBQztRQUMzQixDQUFDLENBQUMsQ0FBQztLQUNKO0lBQUMsT0FBTyxDQUFDLEVBQUU7UUFDVixPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDO0tBQ2hCO0FBQ0gsQ0FBQztBQVpELDRCQVlDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgYXBwIGZyb20gJ3Rucy1jb3JlLW1vZHVsZXMvYXBwbGljYXRpb24nO1xuaW1wb3J0IHsgZGV2aWNlIH0gZnJvbSAndG5zLWNvcmUtbW9kdWxlcy9wbGF0Zm9ybSc7XG5pbXBvcnQgeyBDb2xvciB9IGZyb20gJ3Rucy1jb3JlLW1vZHVsZXMvY29sb3InO1xuaW1wb3J0IHsgVHdpdHRlckJhbmcgfSBmcm9tICduYXRpdmVzY3JpcHQtdHdpdHRlcmJhbmcnO1xuXG5leHBvcnQgZnVuY3Rpb24gcGFnZUxvYWRlZChhcmdzKSB7XG4gIGNvbnN0IHBhZ2UgPSBhcmdzLm9iamVjdDtcbiAgLy8gQ2hhbmdlIHN0YXR1c2JhciBjb2xvciBvbiBMb2xsaXBvcFxuICBpZiAoYXBwLmFuZHJvaWQgJiYgZGV2aWNlLnNka1ZlcnNpb24gPj0gJzIxJykge1xuICAgIGNvbnN0IHdpbmRvdyA9IGFwcC5hbmRyb2lkLnN0YXJ0QWN0aXZpdHkuZ2V0V2luZG93KCk7XG4gICAgd2luZG93LnNldFN0YXR1c0JhckNvbG9yKG5ldyBDb2xvcignI0Q1MDAwMCcpLmFuZHJvaWQpO1xuICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBiYW5nVGhpcyhhcmdzKSB7XG4gIHRyeSB7XG4gICAgY29uc3QgeCA9IGFyZ3Mub2JqZWN0IGFzIFR3aXR0ZXJCYW5nO1xuICAgIGNvbnNvbGUubG9nKCd0d2l0dGVyYmFuZyB4JywgeCk7XG4gICAgY29uc29sZS5sb2coeC5kb3RDb2xvcnMpO1xuXG4gICAgeC5iYW5nKCkudGhlbigoKSA9PiB7XG4gICAgICBjb25zb2xlLmxvZygnYmFuZyB0aGVuJyk7XG4gICAgfSk7XG4gIH0gY2F0Y2ggKGUpIHtcbiAgICBjb25zb2xlLmxvZyhlKTtcbiAgfVxufVxuIl19
--------------------------------------------------------------------------------
/demo/app/main-page.ts:
--------------------------------------------------------------------------------
1 | import * as app from 'tns-core-modules/application';
2 | import { device } from 'tns-core-modules/platform';
3 | import { Color } from 'tns-core-modules/color';
4 | import { TwitterBang } from 'nativescript-twitterbang';
5 |
6 | export function pageLoaded(args) {
7 | const page = args.object;
8 | // Change statusbar color on Lollipop
9 | if (app.android && device.sdkVersion >= '21') {
10 | const window = app.android.startActivity.getWindow();
11 | window.setStatusBarColor(new Color('#D50000').android);
12 | }
13 | }
14 |
15 | export function bangThis(args) {
16 | try {
17 | const x = args.object as TwitterBang;
18 | console.log('twitterbang x', x);
19 | console.log('dotColors', x.dotColors);
20 |
21 | x.bang().then(() => {
22 | console.log('bang then');
23 | });
24 | } catch (e) {
25 | console.log(e);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/demo/app/main-page.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/demo/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tns-template-hello-world",
3 | "main": "app.js",
4 | "version": "1.5.1",
5 | "author": { "name": "Telerik", "email": "support@telerik.com" },
6 | "description": "Nativescript hello-world project template",
7 | "license": "Apache-2.0",
8 | "keywords": [
9 | "telerik",
10 | "mobile",
11 | "nativescript",
12 | "{N}",
13 | "tns",
14 | "appbuilder",
15 | "template"
16 | ],
17 | "repository": {
18 | "type": "git",
19 | "url": "git://github.com/NativeScript/template-hello-world.git"
20 | },
21 | "bugs": {
22 | "url": "https://github.com/NativeScript/template-hello-world/issues"
23 | },
24 | "homepage": "https://github.com/NativeScript/template-hello-world",
25 | "android": { "v8Flags": "--expose_gc" },
26 | "readme": "ERROR: No README data found!",
27 | "_id": "tns-template-hello-world@1.5.1",
28 | "_from": "tns-template-hello-world@1.5.1"
29 | }
30 |
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "nativescript": {
3 | "id": "org.nativescript.twitterbang",
4 | "tns-android": {
5 | "version": "4.0.0"
6 | }
7 | },
8 | "dependencies": {
9 | "nativescript-theme-core": "^1.0.4",
10 | "nativescript-twitterbang": "../src",
11 | "tns-core-modules": "^4.0.0"
12 | },
13 | "devDependencies": {
14 | "babel-traverse": "6.19.0",
15 | "babel-types": "6.19.0",
16 | "babylon": "6.14.1",
17 | "lazy": "1.0.11",
18 | "nativescript-dev-typescript": "^0.7.1",
19 | "tns-platform-declarations": "^4.0.0",
20 | "typescript": "^2.8.1"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "commonjs",
5 | "declaration": false,
6 | "removeComments": true,
7 | "noLib": false,
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "pretty": true,
11 | "allowUnreachableCode": false,
12 | "allowUnusedLabels": false,
13 | "noEmitHelpers": true,
14 | "noEmitOnError": false,
15 | "noImplicitAny": false,
16 | "noImplicitReturns": true,
17 | "noImplicitUseStrict": false,
18 | "noFallthroughCasesInSwitch": true,
19 | "lib": [
20 | "es6",
21 | "dom",
22 | "es2015.iterable"
23 | ],
24 | "typeRoots": [
25 | "./node_modules/@types",
26 | "./node_modules"
27 | ],
28 | "types": [],
29 | "baseUrl": ".",
30 | "paths": {
31 | "*": [
32 | "./node_modules/tns-core-modules/*",
33 | "./node_modules/*"
34 | ],
35 | "~/*": [
36 | "app/*"
37 | ]
38 | }
39 | },
40 | "exclude": [
41 | "node_modules",
42 | "platforms"
43 | ],
44 | "compileOnSave": false
45 | }
--------------------------------------------------------------------------------
/images/nstudio-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/images/nstudio-banner.png
--------------------------------------------------------------------------------
/images/twitterBang.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bradmartin/nativescript-twitterbang/d3e032faed28249c84cd997747356eacf7941903/images/twitterBang.gif
--------------------------------------------------------------------------------
/src/.npmignore:
--------------------------------------------------------------------------------
1 | # generated files
2 | .vs
3 | .vs/
4 | nativescript-twitterbang.sln
5 | .sln
6 | *.sln
7 | demo/
8 | twitterBang.gif
9 | *.gif
10 | *.gif
11 | *.png
12 | *.md
13 | *.gitignore
14 | *.gitattributes
15 | demo/
16 | screens/
17 | app/
18 | .vscode/
19 | *.png
20 | *.log
21 | *.ts
22 | *.js.map
23 | *.md
24 | !index.d.ts
25 | tsconfig.json
26 |
27 | *.map
28 | *.ts
29 | !*.d.ts
30 | tsconfig.json
31 | scripts/*
32 | platforms/android/*
33 | !platforms/android/include.gradle
34 | !platforms/android/*.aar
35 | !platforms/android/*.jar
36 |
--------------------------------------------------------------------------------
/src/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | nativescript-twitterbang
4 | Copyright (c) 2016, Brad Martin
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.
--------------------------------------------------------------------------------
/src/index.d.ts:
--------------------------------------------------------------------------------
1 | import { TwitterBangCommon } from "./twitterbang.common";
2 |
3 | export declare class TwitterBang extends TwitterBangCommon {
4 | android: any;
5 | dotColors: string;
6 | bang(): Promise;
7 | }
8 |
--------------------------------------------------------------------------------
/src/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-twitterbang",
3 | "version": "2.0.0",
4 | "description":
5 | "NativeScript plugin for Android to use native Twitter animation for the exploding heart.",
6 | "main": "twitterbang",
7 | "typings": "index.d.ts",
8 | "nativescript": {
9 | "platforms": {
10 | "android": "1.5.0"
11 | }
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "https://github.com/bradmartin/nativescript-twitterbang"
16 | },
17 | "keywords": [
18 | "NativeScript",
19 | "native",
20 | "script",
21 | "twitter heart",
22 | "android",
23 | "bradmartin",
24 | "nStudio"
25 | ],
26 | "author": {
27 | "name": "Brad Martin",
28 | "url": "https://github.com/bradmartin",
29 | "email": "bradwaynemartin@gmail.com"
30 | },
31 | "license": "MIT",
32 | "bugs": "https://github.com/bradmartin/nativescript-twitterbang/issues",
33 | "homepage": "https://github.com/bradmartin/nativescript-twitterbang",
34 | "readme": "README.md",
35 | "readmeFilename": "README.md",
36 | "devDependencies": {
37 | "husky": "^0.13.4",
38 | "lint-staged": "^3.6.1",
39 | "prettier": "^1.12.0",
40 | "tns-core-modules": "^4.0.0",
41 | "tns-platform-declarations": "~4.0.0",
42 | "typescript": "2.6.2",
43 | "prompt": "^1.0.0",
44 | "rimraf": "^2.5.0",
45 | "tslint": "^5.0.0",
46 | "semver": "^5.5.0"
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/platforms/android/include.gradle:
--------------------------------------------------------------------------------
1 | //default elements
2 | android {
3 |
4 | }
5 |
6 | dependencies {
7 | compile "pub.hanks:smallbang:1.2.2"
8 | }
9 |
--------------------------------------------------------------------------------
/src/references.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "commonjs",
5 | "moduleResolution": "node",
6 | "removeComments": true,
7 | "experimentalDecorators": true,
8 | "sourceMap": true,
9 | "noLib": false,
10 | "noEmitHelpers": true,
11 | "allowUnreachableCode": false,
12 | "allowUnusedLabels": false,
13 | "noEmitOnError": false,
14 | "noImplicitAny": false,
15 | "noImplicitReturns": true,
16 | "noImplicitUseStrict": false,
17 | "noFallthroughCasesInSwitch": true,
18 | "lib": ["es6", "dom"],
19 | "baseUrl": ".",
20 | "paths": {
21 | "*": ["./node_modules/tns-core-modules/*", "./node_modules/*"]
22 | }
23 | },
24 | "compileOnSave": false,
25 | "files": [
26 | "twitterbang.common.ts",
27 | "twitterbang.android.ts",
28 | "twitterbang.ios.ts"
29 | ],
30 |
31 | "exclude": ["node_modules", "demo/node_modules", "platforms"]
32 | }
33 |
--------------------------------------------------------------------------------
/src/twitterbang.android.ts:
--------------------------------------------------------------------------------
1 | /**************************************************************************************
2 | * Made for the {N} community by Brad Martin @BradWayneMartin
3 | * https://twitter.com/BradWayneMartin
4 | * https://github.com/bradmartin
5 | * Pull requests are welcome. Enjoy!
6 | *************************************************************************************/
7 | ///
8 |
9 | import { Color } from 'tns-core-modules/color';
10 | import { TwitterBangCommon, dotColorsProperty } from './twitterbang.common';
11 |
12 | declare var xyz;
13 |
14 | export class TwitterBang extends TwitterBangCommon {
15 | private _androidViewId: number;
16 | public nativeView;
17 |
18 | /**
19 | * Gets the native [android widget](https://github.com/hanks-zyh/SmallBang) that represents the user interface for this component. Valid only when running on Android OS.
20 | */
21 | get android(): any /* xyz.hanks.library.bang.SmallBangView */ {
22 | return this.nativeView;
23 | }
24 |
25 | [dotColorsProperty.setNative](value: string) {
26 | if (value) {
27 | const x = value.split(',');
28 | let colorsArray = [] as number[];
29 | x.forEach(color => {
30 | const c = new Color(color).android;
31 | colorsArray.push(c);
32 | });
33 |
34 | // native library requires at least 4 values
35 | if (colorsArray.length >= 4) {
36 | this.nativeView.setDotColors(colorsArray);
37 | }
38 | }
39 | }
40 |
41 | constructor() {
42 | super();
43 | }
44 |
45 | public createNativeView() {
46 | return new xyz.hanks.library.bang.SmallBangView(this._context);
47 | }
48 |
49 | public initNativeView() {
50 | this._androidViewId = android.view.View.generateViewId();
51 | this.nativeView.setId(this._androidViewId);
52 | }
53 |
54 | public bang() {
55 | return new Promise((resolve, reject) => {
56 | try {
57 | this.android.likeAnimation();
58 | resolve();
59 | } catch (error) {
60 | reject(error);
61 | }
62 | });
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/twitterbang.common.ts:
--------------------------------------------------------------------------------
1 | import { ContentView, Property } from 'tns-core-modules/ui/content-view';
2 |
3 | export class TwitterBangCommon extends ContentView {
4 | /**
5 | * Gets the native [android widget](https://github.com/hanks-zyh/SmallBang) that represents the user interface for this component. Valid only when running on Android OS.
6 | */
7 | android: any /* xyz.hanks.library.bang.SmallBangView */;
8 |
9 | /**
10 | * A comma delimited string of colors to use for the dots in the animation.
11 | * Must be at least 4 colors.
12 | * Example: #ff4801,#ff4081,#ff3636,#228289
13 | */
14 | dotColors: string;
15 | }
16 |
17 | export const dotColorsProperty = new Property({
18 | name: 'dotColors'
19 | });
20 | dotColorsProperty.register(TwitterBangCommon);
21 |
--------------------------------------------------------------------------------
/src/twitterbang.ios.ts:
--------------------------------------------------------------------------------
1 | /**************************************************************************************
2 | * Made for the {N} community by Brad Martin @BradWayneMartin
3 | * https://twitter.com/BradWayneMartin
4 | * https://github.com/bradmartin
5 | * Pull requests are welcome. Enjoy!
6 | *************************************************************************************/
7 |
8 | export function TwitterBang(view) {
9 | console.log('Not supported on iOS.');
10 | return;
11 | }
12 |
--------------------------------------------------------------------------------