47 Commits

Author SHA1 Message Date
2146ac902f feat(file-system): async read/write (#7671) 2019-10-02 11:21:18 +03:00
c0b8db4098 feat: flexbile font icon usage in tab navigation (#7672) 2019-08-15 17:32:48 +03:00
2518655ab3 fix(tabs-android): tabStripItem color not applied (#7617) 2019-08-01 10:02:05 +03:00
46c17ca3a4 fix(bottom-navigation): crash when tab selected with no item (#7527) 2019-07-19 17:09:40 +03:00
fab9c90007 feat(bottom-navigation-android): add tabstripitem css support (#7458)
* wip: add background color placeholders for tabstripitem

* feat: add css for tabstripitem for bottom navigation android

* chore: update example

* fix: revert native default index

* clean up tabcontentitem

* update setTabBarItemTextTransform

* textTransform inherited css property now

* fix(android-bottom-navigation): fragment detach logic

* chore: fix tests

* fix(android-bottom-navigation): fragment lifecycle logic

* fix: revert text-transform inherited css property
2019-07-09 13:33:32 +03:00
5f9eabdf17 feat: update android typings to include @deprecated attributes (#7364)
* feat: added tslint rule for deprecation turned off
* feat: updated android dts files to include @deprecated
2019-06-17 18:56:34 +03:00
0c2c1ccfde feat: re-design tab views (#7340) 2019-06-13 11:01:55 +03:00
c5db112b8d feat(android): androidX support (#7039)
* feat: migrate support library namespaces to androidX

* feat(tns-platform-declarations): update to androidX typings

* chore(tests): migrate test apps to AndroidX

* chore(tns-platform-declarations): update tsconfig to include androidx dts files

* update package.json to androidx

* chore(androidx): migrate forgotten support library namspaces

* feat(tns-core-modules-widgets): migrate to AndroidX namespaces

* chore(utils): update androidx namspace for getPaletteColor method

* chore(apps): update tns-platform-declarations package

* Update package.json
2019-06-10 09:21:41 +03:00
8b4a9b3c6b feat: Provide API to release the native object wrapped by a JS one (#6873)
* Add `releaseNativeObject` function in `utils`
* Add tests
* Add typings for the global `__releaseNativeCounterpart` functions
provided by Android and iOS runtimes

refs https://github.com/NativeScript/ios-runtime/issues/1062 and https://github.com/NativeScript/android-runtime/issues/1254
2019-02-08 10:42:51 +02:00
3481e6f33f feat(image-cache): expose onError callback (#6458)
* feat(Cache): better error handling

* refactor(image-cache): add `error` parameter to `_onDownloadError`

Add DownloadError interface.

* refactor(image-cache): updates for iOS

Use arrow functions.
Remove an unnecessary `trace.write().

* refactor(image-cache): updates for Android

Update Android `constructor()`.
Move `key` and `image` check to `set()`.
Update `trace.write`.

* fix(image-cache): onError handling
2018-12-17 11:33:12 +02:00
c084660d0b fix(android): nested fragment disappears on parent fragment removal (#6677) 2018-12-12 14:16:10 +02:00
ae0fa90290 feat(scrollbar): add isScrollEnabled property (#6640) 2018-11-30 17:18:40 +02:00
b9fc373eb8 feat: add platform declarations for Android API 28 (Android 9) (#6243)
* feat: add platform declarations for Android API 28 (Android 9)

* updates support file for Android 28 declarations
2018-09-07 15:36:31 +03:00
20e1d78f7d Add missing globalAndroid import (#6080) 2018-07-18 16:36:59 +03:00
8b22585249 Added parameterless constructors (#6044) 2018-07-13 17:29:36 +03:00
398c9b3f33 feat(typings): Adding Android typings for API levels from 17 to 27 (#5890)
Adding android typings for API levels from 17 to 27

BREAKING CHANGES:
There is no longer added `I` prefix in the names of the interfaces. For example `android.view.IMenuItem` is now `android.view.MenuItem`. This matches the original name of the interface in the android framework.
2018-07-05 18:36:23 +03:00
9d21a743c4 Revert 5772 revert 5534 css gradients (#5779)
* Revert "Revert "Css gradients" (#5772)"

This reverts commit 7edf56197a179b13e1afe4c706aea4a99ac62aca.

* chore(): fix LinearGradient circular dependency
2018-05-10 10:44:35 +03:00
11f0d6e98d feat(tabview): add tab text font size property (#5752)
* feat(tabview): add tab text font size property

* chore(tabview): set tab font size default value

* chore(tabview): move font implementation to widget

* chore(tabview): fix font size get return type
2018-05-09 17:13:34 +03:00
7edf56197a Revert "Css gradients" (#5772)
This reverts commit 5a83a1c858e8095353aa50fe4ea080b07bf85813.
2018-05-03 18:17:07 +03:00
5a83a1c858 Css gradients (#5534)
* feat(ios): Added support for css gradients.

* feat(android): Added support for css gradients.

* fix: Fixed gradient borders on ios

* fix(gradient): added backgroundGradient to View and Style.

* fix(ios-gradients): fixed ios gradients covering view content.

* test(gradient): Added ui app tests for background gradients.

* test(gradient): Added a test ensuring background gradient property is applied to style.

* style(gradient): Fixed tslint errors.

* fix(gradient): Removed the background-gradient property and added the gradient to background-image.

* style: fixed a consecutive blank line tslint error.

* fix(tests): fixed the bug that was causing tests to fail.

* chore(linear-gradient): fix equality comparer

* test(gradient): add linear gradients test app

* chore(tslint): update with latest tslint rules
2018-05-03 13:24:41 +03:00
a94ec9946f Improve ImageAsset scaling (#5110)
* Do not depend on current device screen while calculating Image Asset size.

* Scale the image asset to the exact requested size.

* Process image assets natively, pass keepAspectRatio based on the stretch property and Asset options.

* Fixed the splashscreen resource name as it cannot be read when containing a dot.

* Updated the Image Asset scale and rotate logic based on the Native one.

* Make the ImageAsset size more important than the Image decode size as its more specific.

* Fixed tslint errors.

* Added filePath support in the ImageAsset constructor for iOS in order to unify it with the Android implementation, support for relative files and file not found support errors.

* Added unit tests for ImageAssets.

* Added a sample app for UI testing of image-view with ImageAsset src.

* chore: apply PR comments
2018-02-28 14:04:01 +02:00
f8dce08f0e feat(tab-view-android): enable tabs repositioning (#5385)
* feat(tab-view-android): enable tabs repositioning

* feat(tab-view-android): enable tabs repositioning

* chore(apps): add bottom tab view example
2018-02-08 11:06:07 +02:00
199d83c902 Generated platforms declarations for iOS 11
Fixed broken unit-tests
ios layout now run only for the innermost viewcontoller
ios layout for viewcontrollers now implemented with constraints
Added ios11 safeAreas layout support
onMeasure back for frame and tab-view so that they won't throw exception if measure is called on them
Page parents layout updated after page is layout so that inner layout flags are correct
2017-12-15 13:06:34 +02:00
075e70e336 cache page on forward navigation (#4652)
* cache page on forward navigation
Still some failing navigation tests

* Current page is kept alive when navigating forward
Refactoring code and removing all hacks and flags
Remove one module circular reference

* Disable Page recycling because when there is transition between pages the nativeView stays animated (e.g. when transition is Fade the hidden page nativeView stays with Alpha 0)
Disable recycling if there is native anitmation

* Fix failing tests on ios & android API17
Fix wrong urls in http tests
Made some timer tests async

* Animations are not stored in BackstackEntry instead of Fragment because fragments could die (activity die) and recreated and we lose animations.

* Fix android crash when activity is recreated.
Refactoring transitionListener.
2017-08-07 17:24:12 +03:00
8adb2fdfef Fix TypeScript 2.4 errors, introduced mainly due weak types and covariant checking for callbacks (#4476) 2017-07-03 11:57:00 +03:00
9e3222781a backgroundImage property now use Fetcher & Cache as Image component (#4030)
* backgroundImage property now use Fetcher & Cache as Image component
Fix GridLayout tests on iPhone Plus - actualLength wasn’t rounded
ImageCache is closed when activity is stopped

* Fix reset of background drawable.

* additional check for drawable

* imageCache init cache on activity Started
2017-04-21 16:50:12 +03:00
f2898f84d5 NativeView recycled for android 2017-03-28 18:08:59 +03:00
290a771ea1 add calls to the network agent (Chrome DevTools) inside http-request.android when making http requests if debugging is enabled 2017-03-17 09:44:25 +02:00
a824224cca FIX: Segmenter bar thickness 2017-03-14 14:42:54 +02:00
1d49f5f3c3 fix padding on text-view & text-field (#3758)
* fix padding on text-view & text-field
text-base is now snapshotable
view.android is now snapshotable

* createNativeView returns the nativeView for android
Fix image tests
Implement test for image loaded from res://
EffectivePaddings updated when nativeView have some from its native theme
2017-03-09 16:09:53 +02:00
33aa48bdfd Add support for snapshot
Fix Layout class getMeasuredWidth & getMeasuredHeight
Move some classes to widgets
Fix API17 tests
2017-03-06 14:05:55 +02:00
7b12686b18 add HttpRequestOptions.dontFollowRedirects (#3473)
This implements the option to have http.request() not follow server's 3xx redirection replies
but instead return the exact redirection code and headers.

* on iOS, it uses a different NSURLSession instance for non-following request,
  with a NSURLSessionTaskDelegate implementing URLSessinTaskWillPerformHTTPRedirection...

* on Android, it just passes the option on to org.nativescript.widgets.Async.Http;
  so this requires the respective commit in tns-core-modules-widgets to work
2017-01-12 11:21:10 +02:00
52a84b211f Fixed: Setting setTypeface() to null object
Resolves #3147
2017-01-03 12:33:36 +02:00
417064fd38 Fix Android lifecycle 2016-12-20 16:12:52 +02:00
6c3d71cadf fix modules build errors 2016-12-13 16:07:42 +02:00
19ee47ba24 got to layouts 2016-12-13 15:51:18 +02:00
645f428f59 alpha1 2016-12-13 15:51:18 +02:00
bb08cc1b49 Merge pull request #3011 from NativeScript/issue-3007
Fix: java.lang.NumberFormatException when applying clip-path with per…
2016-11-03 09:45:31 +02:00
28f084e7d2 Fix: java.lang.NumberFormatException when applying clip-path with percentage values
Resolves #3007
2016-11-02 16:59:06 +02:00
c5d34c3dd4 Image loading is done through native imageView so that once it is removed from window the bitmap is cleared. 2016-11-02 16:57:42 +02:00
9fc143ee03 Add support for TabView CSS
TabView {
    tab-text-color: green;
    tab-background-color: yellow;
    selected-tab-text-color: red;
    android-selected-tab-highlight-color: orange;
    text-transform: uppercase;
}
2016-10-24 15:07:22 +03:00
791aab04e5 Flexbox ios initial commit
Items now appear, but they should initially shrink and they don't

Add 15-ish tests for flexbox layout

Port reasonable flexbox test set

Fixing issues, adding unit tests

Moved from .tsx to .ts and used our ui/builder.parse
2016-10-19 17:02:26 +03:00
98deeccb21 Change image.android to use the new image.Cache class from widgets. (#2832)
* Change image.android to use the new image.Cahce class from widgets.

* fix npm scripts

* npm tsc will compile all so no need for npm run dev-tsc-tests

* fix tslint error

* image-tests use memory only cache.

* fix exception in image.android

* Change image-tests so that Image won't be GC immediately.

* Change cacheMode to enum
2016-10-05 13:09:08 +03:00
702b7eadd3 Merge pull request #2822 from NativeScript/nnikolov/CameraRefactoring
Refactored image loading from camera.
2016-10-03 17:54:07 +03:00
1f84274182 Refactored image loading from camera. 2016-10-03 17:23:18 +03:00
943e67a4c8 Add flexbox, we have to figure out layout params 2016-09-30 12:20:07 +03:00
299203901e Move platform .d.ts-es to separate plugin folder
Add dev-setup to figure out links

Update development workflow

Update package.json and dts-ios

Update the iOS declarations

grunt is now fine
2016-09-26 11:53:39 +03:00