@nativescript/core 9.0.0-next-10-06-2025-18277360121 → 9.0.0-next-10-09-2025-18367604937

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/package.json +1 -1
  2. package/platforms/android/widgets-release.aar +0 -0
  3. package/platforms/ios/TNSWidgets.xcframework/Info.plist +102 -0
  4. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
  5. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
  6. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Info.plist +0 -0
  7. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Modules/module.modulemap +6 -0
  8. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets +0 -0
  9. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
  10. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  11. package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
  12. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
  13. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
  14. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
  15. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
  16. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
  17. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
  18. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
  19. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
  20. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
  21. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +6 -0
  22. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
  23. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
  24. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +52 -0
  25. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSCCrypto.h +60 -0
  26. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSData+Async.h +24 -0
  27. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSFileHandle+Async.h +22 -0
  28. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSString+Async.h +25 -0
  29. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSLabel.h +16 -0
  30. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSProcess.h +29 -0
  31. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSWidgets.h +25 -0
  32. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/UIImage+TNSBlocks.h +26 -0
  33. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/UIView+PassThroughParent.h +17 -0
  34. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Modules/module.modulemap +6 -0
  35. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/PrivateHeaders/NSObject+Swizzling.h +17 -0
  36. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/PrivateHeaders/UIView+PropertyBag.h +18 -0
  37. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist +52 -0
  38. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets +0 -0
  39. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSCCrypto.h +60 -0
  40. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSData+Async.h +24 -0
  41. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSFileHandle+Async.h +22 -0
  42. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSString+Async.h +25 -0
  43. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSLabel.h +16 -0
  44. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSProcess.h +29 -0
  45. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSWidgets.h +25 -0
  46. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIImage+TNSBlocks.h +26 -0
  47. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIView+PassThroughParent.h +17 -0
  48. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Modules/module.modulemap +6 -0
  49. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/NSObject+Swizzling.h +17 -0
  50. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/UIView+PropertyBag.h +18 -0
  51. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Resources/Info.plist +52 -0
  52. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
  53. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
  54. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  55. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
  56. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +82 -0
  57. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
  58. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
  59. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
  60. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
  61. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
  62. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
  63. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
  64. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
  65. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
  66. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
  67. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Modules/module.modulemap +6 -0
  68. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
  69. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
  70. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
  71. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +223 -0
  72. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
  73. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  74. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
  75. package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +82 -0
  76. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
  77. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
  78. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
  79. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
  80. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
  81. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
  82. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
  83. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
  84. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
  85. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Info.plist +0 -0
  86. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Modules/module.modulemap +6 -0
  87. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
  88. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
  89. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/TNSWidgets +0 -0
  90. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
  91. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  92. package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
  93. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
  94. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
  95. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
  96. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
  97. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
  98. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
  99. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
  100. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
  101. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
  102. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
  103. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Modules/module.modulemap +6 -0
  104. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
  105. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
  106. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
  107. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +223 -0
  108. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +20 -0
  109. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
  110. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +82 -0
  111. package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +82 -0
  112. package/platforms/ios/src/module.modulemap +0 -5
  113. package/ui/button/index.d.ts +1 -1
  114. package/ui/slider/index.d.ts +1 -1
  115. package/platforms/android/include.gradle +0 -51
  116. package/platforms/android/java/org/nativescript/Process.java +0 -59
  117. package/platforms/android/java/org/nativescript/widgets/AbsoluteLayout.java +0 -88
  118. package/platforms/android/java/org/nativescript/widgets/AnimatorHelper.java +0 -61
  119. package/platforms/android/java/org/nativescript/widgets/Async.java +0 -1356
  120. package/platforms/android/java/org/nativescript/widgets/BorderDrawable.java +0 -936
  121. package/platforms/android/java/org/nativescript/widgets/BottomNavigationBar.java +0 -308
  122. package/platforms/android/java/org/nativescript/widgets/BoxShadowDrawable.java +0 -175
  123. package/platforms/android/java/org/nativescript/widgets/CSSValue.java +0 -34
  124. package/platforms/android/java/org/nativescript/widgets/CommonLayoutParams.java +0 -456
  125. package/platforms/android/java/org/nativescript/widgets/ContentLayout.java +0 -85
  126. package/platforms/android/java/org/nativescript/widgets/CustomTransition.java +0 -135
  127. package/platforms/android/java/org/nativescript/widgets/CustomTypefaceSpan.java +0 -44
  128. package/platforms/android/java/org/nativescript/widgets/Dock.java +0 -15
  129. package/platforms/android/java/org/nativescript/widgets/DockLayout.java +0 -185
  130. package/platforms/android/java/org/nativescript/widgets/FileHelper.java +0 -815
  131. package/platforms/android/java/org/nativescript/widgets/FlexLine.java +0 -177
  132. package/platforms/android/java/org/nativescript/widgets/FlexboxLayout.java +0 -2769
  133. package/platforms/android/java/org/nativescript/widgets/FragmentBase.java +0 -14
  134. package/platforms/android/java/org/nativescript/widgets/GridLayout.java +0 -1172
  135. package/platforms/android/java/org/nativescript/widgets/GridUnitType.java +0 -10
  136. package/platforms/android/java/org/nativescript/widgets/HorizontalScrollView.java +0 -256
  137. package/platforms/android/java/org/nativescript/widgets/ImageView.java +0 -423
  138. package/platforms/android/java/org/nativescript/widgets/ItemSpec.java +0 -56
  139. package/platforms/android/java/org/nativescript/widgets/LayoutBase.java +0 -98
  140. package/platforms/android/java/org/nativescript/widgets/LinearGradientDefinition.java +0 -46
  141. package/platforms/android/java/org/nativescript/widgets/Orientation.java +0 -9
  142. package/platforms/android/java/org/nativescript/widgets/OriginPoint.java +0 -74
  143. package/platforms/android/java/org/nativescript/widgets/ScrollSavedState.java +0 -63
  144. package/platforms/android/java/org/nativescript/widgets/SegmentedBarColorDrawable.java +0 -27
  145. package/platforms/android/java/org/nativescript/widgets/StackLayout.java +0 -231
  146. package/platforms/android/java/org/nativescript/widgets/StyleableTextView.java +0 -50
  147. package/platforms/android/java/org/nativescript/widgets/TabIconRenderingMode.java +0 -6
  148. package/platforms/android/java/org/nativescript/widgets/TabItemSpec.java +0 -15
  149. package/platforms/android/java/org/nativescript/widgets/TabLayout.java +0 -451
  150. package/platforms/android/java/org/nativescript/widgets/TabStrip.java +0 -294
  151. package/platforms/android/java/org/nativescript/widgets/TabViewPager.java +0 -64
  152. package/platforms/android/java/org/nativescript/widgets/TabsBar.java +0 -443
  153. package/platforms/android/java/org/nativescript/widgets/Utils.java +0 -546
  154. package/platforms/android/java/org/nativescript/widgets/VerticalScrollView.java +0 -258
  155. package/platforms/android/java/org/nativescript/widgets/ViewHelper.java +0 -564
  156. package/platforms/android/java/org/nativescript/widgets/WrapLayout.java +0 -252
  157. package/platforms/android/java/org/nativescript/widgets/image/AsyncTask.java +0 -679
  158. package/platforms/android/java/org/nativescript/widgets/image/BitmapOwner.java +0 -17
  159. package/platforms/android/java/org/nativescript/widgets/image/Cache.java +0 -471
  160. package/platforms/android/java/org/nativescript/widgets/image/DiskLruCache.java +0 -970
  161. package/platforms/android/java/org/nativescript/widgets/image/Fetcher.java +0 -747
  162. package/platforms/android/java/org/nativescript/widgets/image/Utils.java +0 -58
  163. package/platforms/android/java/org/nativescript/widgets/image/Worker.java +0 -571
  164. package/platforms/ios/src/TNSWidgets/Info.plist +0 -26
  165. package/platforms/ios/src/TNSWidgets/NSData+Async.m +0 -42
  166. package/platforms/ios/src/TNSWidgets/NSFileHandle+Async.m +0 -82
  167. package/platforms/ios/src/TNSWidgets/NSObject+Swizzling.m +0 -68
  168. package/platforms/ios/src/TNSWidgets/NSString+Async.m +0 -51
  169. package/platforms/ios/src/TNSWidgets/TNSLabel.m +0 -42
  170. package/platforms/ios/src/TNSWidgets/UIImage+TNSBlocks.m +0 -77
  171. package/platforms/ios/src/TNSWidgets/UIView+PassThroughParent.m +0 -53
  172. package/platforms/ios/src/TNSWidgets/UIView+PropertyBag.m +0 -72
  173. /package/platforms/ios/{src/TNSWidgets → TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers}/NSData+Async.h +0 -0
  174. /package/platforms/ios/{src/TNSWidgets → TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers}/NSFileHandle+Async.h +0 -0
  175. /package/platforms/ios/{src/TNSWidgets → TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers}/NSString+Async.h +0 -0
  176. /package/platforms/ios/{src/TNSWidgets → TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers}/TNSLabel.h +0 -0
  177. /package/platforms/ios/{src/TNSWidgets → TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers}/TNSWidgets.h +0 -0
  178. /package/platforms/ios/{src/TNSWidgets → TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers}/UIImage+TNSBlocks.h +0 -0
  179. /package/platforms/ios/{src/TNSWidgets → TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers}/UIView+PassThroughParent.h +0 -0
  180. /package/platforms/ios/{src/TNSWidgets → TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/PrivateHeaders}/NSObject+Swizzling.h +0 -0
  181. /package/platforms/ios/{src/TNSWidgets → TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/PrivateHeaders}/UIView+PropertyBag.h +0 -0
@@ -1,456 +0,0 @@
1
- /**
2
- *
3
- */
4
- package org.nativescript.widgets;
5
-
6
- import android.annotation.SuppressLint;
7
- import android.content.Context;
8
- import android.content.pm.ApplicationInfo;
9
- import android.content.pm.PackageManager.NameNotFoundException;
10
- import android.util.Log;
11
- import android.view.Gravity;
12
- import android.view.View;
13
- import android.view.View.MeasureSpec;
14
- import android.view.ViewGroup;
15
- import android.view.ViewGroup.LayoutParams;
16
- import android.widget.FrameLayout;
17
-
18
- /**
19
- * @author hhristov
20
- */
21
- public class CommonLayoutParams extends FrameLayout.LayoutParams {
22
-
23
- static final String TAG = "NSLayout";
24
- static int debuggable = -1;
25
- private static final int NOT_SET = Integer.MIN_VALUE;
26
- private static final StringBuilder sb = new StringBuilder();
27
-
28
- public CommonLayoutParams() {
29
- super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, Gravity.FILL);
30
- }
31
-
32
- public CommonLayoutParams(ViewGroup.LayoutParams source) {
33
- super(source);
34
- }
35
-
36
- public CommonLayoutParams(ViewGroup.MarginLayoutParams source) {
37
- super(source);
38
- }
39
-
40
- public CommonLayoutParams(FrameLayout.LayoutParams source) {
41
- super((ViewGroup.MarginLayoutParams) source);
42
- this.gravity = source.gravity;
43
- }
44
-
45
- public CommonLayoutParams(CommonLayoutParams source) {
46
- this((FrameLayout.LayoutParams) source);
47
-
48
- this.widthPercent = source.widthPercent;
49
- this.heightPercent = source.heightPercent;
50
-
51
- this.topMargin = source.topMargin;
52
- this.leftMargin = source.leftMargin;
53
- this.bottomMargin = source.bottomMargin;
54
- this.rightMargin = source.rightMargin;
55
-
56
- this.left = source.left;
57
- this.top = source.top;
58
- this.row = source.row;
59
- this.column = source.column;
60
- this.rowSpan = source.rowSpan;
61
- this.columnSpan = source.columnSpan;
62
- this.dock = source.dock;
63
- }
64
-
65
- public float widthPercent = 0;
66
- public float heightPercent = 0;
67
-
68
- public float topMarginPercent = 0;
69
- public float leftMarginPercent = 0;
70
- public float bottomMarginPercent = 0;
71
- public float rightMarginPercent = 0;
72
-
73
- public int widthOriginal = NOT_SET;
74
- public int heightOriginal = NOT_SET;
75
-
76
- public int topMarginOriginal = NOT_SET;
77
- public int leftMarginOriginal = NOT_SET;
78
- public int bottomMarginOriginal = NOT_SET;
79
- public int rightMarginOriginal = NOT_SET;
80
-
81
- public int left = 0;
82
- public int top = 0;
83
- public int row = 0;
84
- public int column = 0;
85
- public int rowSpan = 1;
86
- public int columnSpan = 1;
87
- public Dock dock = Dock.left;
88
-
89
- protected static int getDesiredWidth(View view) {
90
- CommonLayoutParams lp = (CommonLayoutParams) view.getLayoutParams();
91
- return view.getMeasuredWidth() + lp.leftMargin + lp.rightMargin;
92
- }
93
-
94
- protected static int getDesiredHeight(View view) {
95
- CommonLayoutParams lp = (CommonLayoutParams) view.getLayoutParams();
96
- return view.getMeasuredHeight() + lp.topMargin + lp.bottomMargin;
97
- }
98
-
99
- // We use our own layout method because the one in FrameLayout is broken when margins are set and gravity is CENTER_VERTICAL or CENTER_HORIZONTAL.
100
- @SuppressLint("RtlHardcoded")
101
- protected static void layoutChild(View child, int left, int top, int right, int bottom) {
102
- if (child == null || child.getVisibility() == View.GONE) {
103
- return;
104
- }
105
-
106
- int childTop = 0;
107
- int childLeft = 0;
108
-
109
- int childWidth = child.getMeasuredWidth();
110
- int childHeight = child.getMeasuredHeight();
111
-
112
- CommonLayoutParams lp = (CommonLayoutParams) child.getLayoutParams();
113
- int gravity = lp.gravity;
114
- if (gravity == -1) {
115
- gravity = Gravity.FILL;
116
- }
117
-
118
- int verticalGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK;
119
-
120
- // If we have explicit height and gravity is FILL we need to be centered otherwise our explicit height won't be taken into account.
121
- if ((lp.height >= 0 || lp.heightPercent > 0) && verticalGravity == Gravity.FILL_VERTICAL) {
122
- verticalGravity = Gravity.CENTER_VERTICAL;
123
- }
124
-
125
- switch (verticalGravity) {
126
- case Gravity.TOP:
127
- childTop = top + lp.topMargin;
128
- break;
129
-
130
- case Gravity.CENTER_VERTICAL:
131
- childTop = top + (bottom - top - childHeight + lp.topMargin - lp.bottomMargin) / 2;
132
- break;
133
-
134
- case Gravity.BOTTOM:
135
- childTop = bottom - childHeight - lp.bottomMargin;
136
- break;
137
-
138
- case Gravity.FILL_VERTICAL:
139
- default:
140
- childTop = top + lp.topMargin;
141
- childHeight = bottom - top - (lp.topMargin + lp.bottomMargin);
142
- break;
143
- }
144
-
145
- int horizontalGravity = Gravity.getAbsoluteGravity(gravity, child.getLayoutDirection()) & Gravity.HORIZONTAL_GRAVITY_MASK;
146
-
147
- // If we have explicit width and gravity is FILL we need to be centered otherwise our explicit width won't be taken into account.
148
- if ((lp.width >= 0 || lp.widthPercent > 0) && horizontalGravity == Gravity.FILL_HORIZONTAL) {
149
- horizontalGravity = Gravity.CENTER_HORIZONTAL;
150
- }
151
-
152
- switch (horizontalGravity) {
153
- case Gravity.LEFT:
154
- childLeft = left + lp.leftMargin;
155
- break;
156
-
157
- case Gravity.CENTER_HORIZONTAL:
158
- childLeft = left + (right - left - childWidth + lp.leftMargin - lp.rightMargin) / 2;
159
- break;
160
-
161
- case Gravity.RIGHT:
162
- childLeft = right - childWidth - lp.rightMargin;
163
- break;
164
-
165
- case Gravity.FILL_HORIZONTAL:
166
- default:
167
- childLeft = left + lp.leftMargin;
168
- childWidth = right - left - (lp.leftMargin + lp.rightMargin);
169
- break;
170
- }
171
-
172
- int childRight = Math.round(childLeft + childWidth);
173
- int childBottom = Math.round(childTop + childHeight);
174
- childLeft = Math.round(childLeft);
175
- childTop = Math.round(childTop);
176
-
177
- // Re-measure TextView because it is not centered if layout width is larger than measure width.
178
- if (child instanceof android.widget.TextView) {
179
-
180
- boolean canChangeWidth = lp.width < 0;
181
- boolean canChangeHeight = lp.height < 0;
182
-
183
- int measuredWidth = child.getMeasuredWidth();
184
- int measuredHeight = child.getMeasuredHeight();
185
-
186
- int width = childRight - childLeft;
187
- int height = childBottom - childTop;
188
- if ((Math.abs(measuredWidth - width) > 1 && canChangeWidth) || (Math.abs(measuredHeight - height) > 1 && canChangeHeight)) {
189
- int widthMeasureSpec = MeasureSpec.makeMeasureSpec(canChangeWidth ? width : lp.width, MeasureSpec.EXACTLY);
190
- int heightMeasureSpec = MeasureSpec.makeMeasureSpec(canChangeHeight ? height : lp.height, MeasureSpec.EXACTLY);
191
- if (debuggable > 0) {
192
- sb.setLength(0);
193
- sb.append("remeasure ");
194
- sb.append(child);
195
- sb.append(" with ");
196
- sb.append(MeasureSpec.toString(widthMeasureSpec));
197
- sb.append(", ");
198
- sb.append(MeasureSpec.toString(heightMeasureSpec));
199
- log(TAG, sb.toString());
200
- }
201
-
202
- child.measure(widthMeasureSpec, heightMeasureSpec);
203
- }
204
- }
205
-
206
- if (debuggable > 0) {
207
- sb.setLength(0);
208
- sb.append(child.getParent().toString());
209
- sb.append(" :layoutChild: ");
210
- sb.append(child);
211
- sb.append(" ");
212
- sb.append(childLeft);
213
- sb.append(", ");
214
- sb.append(childTop);
215
- sb.append(", ");
216
- sb.append(childRight);
217
- sb.append(", ");
218
- sb.append(childBottom);
219
- log(TAG, sb.toString());
220
- }
221
-
222
- child.layout(childLeft, childTop, childRight, childBottom);
223
- }
224
-
225
- protected static void measureChild(View child, int widthMeasureSpec, int heightMeasureSpec) {
226
- if (child == null || child.getVisibility() == View.GONE) {
227
- return;
228
- }
229
-
230
- // Negative means not initialized.
231
- if (debuggable < 0) {
232
- try {
233
- Context context = child.getContext();
234
- ApplicationInfo ai = context.getPackageManager().getApplicationInfo(context.getPackageName(), android.content.pm.PackageManager.GET_META_DATA);
235
- android.os.Bundle bundle = ai.metaData;
236
- Boolean debugLayouts = bundle != null && bundle.getBoolean("debugLayouts", false);
237
- debuggable = debugLayouts ? 1 : 0;
238
- } catch (NameNotFoundException e) {
239
- debuggable = 0;
240
- Log.e(TAG, "Failed to load meta-data, NameNotFound: " + e.getMessage());
241
- } catch (NullPointerException e) {
242
- debuggable = 0;
243
- Log.e(TAG, "Failed to load meta-data, NullPointer: " + e.getMessage());
244
- }
245
- }
246
-
247
- int childWidthMeasureSpec = getMeasureSpec(child, widthMeasureSpec, true);
248
- int childHeightMeasureSpec = getMeasureSpec(child, heightMeasureSpec, false);
249
-
250
- if (debuggable > 0) {
251
- sb.setLength(0);
252
- sb.append(child.getParent().toString());
253
- sb.append(" :measureChild: ");
254
- sb.append(child);
255
- sb.append(" ");
256
- sb.append(MeasureSpec.toString(childWidthMeasureSpec));
257
- sb.append(", ");
258
- sb.append(MeasureSpec.toString(childHeightMeasureSpec));
259
- log(TAG, sb.toString());
260
- }
261
-
262
- child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
263
- }
264
-
265
- /**
266
- * Iterates over children and changes their width and height to one calculated from percentage
267
- * values.
268
- *
269
- * @param viewGroup The parent ViewGroup.
270
- * @param widthMeasureSpec Width MeasureSpec of the parent ViewGroup.
271
- * @param heightMeasureSpec Height MeasureSpec of the parent ViewGroup.
272
- */
273
- protected static void adjustChildrenLayoutParams(ViewGroup viewGroup, int widthMeasureSpec, int heightMeasureSpec) {
274
-
275
- int availableWidth = MeasureSpec.getSize(widthMeasureSpec);
276
- int widthSpec = MeasureSpec.getMode(widthMeasureSpec);
277
-
278
- int availableHeight = MeasureSpec.getSize(heightMeasureSpec);
279
- int heightSpec = MeasureSpec.getMode(heightMeasureSpec);
280
-
281
- for (int i = 0, count = viewGroup.getChildCount(); i < count; i++) {
282
- View child = viewGroup.getChildAt(i);
283
- LayoutParams params = child.getLayoutParams();
284
-
285
- if (params instanceof CommonLayoutParams) {
286
- CommonLayoutParams lp = (CommonLayoutParams) child.getLayoutParams();
287
- if (widthSpec != MeasureSpec.UNSPECIFIED) {
288
- if (lp.widthPercent > 0) {
289
- // If we get measured twice we will override the original value with the one calculated from percentValue from the first measure.
290
- // So we set originalValue only the first time.
291
- if (lp.widthOriginal == NOT_SET) {
292
- lp.widthOriginal = lp.width;
293
- }
294
- lp.width = (int) (availableWidth * lp.widthPercent);
295
- } else {
296
- lp.widthOriginal = NOT_SET;
297
- }
298
-
299
- if (lp.leftMarginPercent > 0) {
300
- if (lp.leftMarginOriginal == NOT_SET) {
301
- lp.leftMarginOriginal = lp.leftMargin;
302
- }
303
- lp.leftMargin = (int) (availableWidth * lp.leftMarginPercent);
304
- } else {
305
- lp.leftMarginOriginal = NOT_SET;
306
- }
307
-
308
- if (lp.rightMarginPercent > 0) {
309
- if (lp.rightMarginOriginal == NOT_SET) {
310
- lp.rightMarginOriginal = lp.rightMargin;
311
- }
312
- lp.rightMargin = (int) (availableWidth * lp.rightMarginPercent);
313
- } else {
314
- lp.rightMarginOriginal = NOT_SET;
315
- }
316
- }
317
-
318
- if (heightSpec != MeasureSpec.UNSPECIFIED) {
319
- if (lp.heightPercent > 0) {
320
- if (lp.heightOriginal == NOT_SET) {
321
- lp.heightOriginal = lp.height;
322
- }
323
- lp.height = (int) (availableHeight * lp.heightPercent);
324
- } else {
325
- lp.heightOriginal = NOT_SET;
326
- }
327
-
328
- if (lp.topMarginPercent > 0) {
329
- if (lp.topMarginOriginal == NOT_SET) {
330
- lp.topMarginOriginal = lp.topMargin;
331
- }
332
- lp.topMargin = (int) (availableHeight * lp.topMarginPercent);
333
- } else {
334
- lp.topMarginOriginal = NOT_SET;
335
- }
336
-
337
- if (lp.bottomMarginPercent > 0) {
338
- if (lp.bottomMarginOriginal == NOT_SET) {
339
- lp.bottomMarginOriginal = lp.bottomMargin;
340
- }
341
- lp.bottomMargin = (int) (availableHeight * lp.bottomMarginPercent);
342
- } else {
343
- lp.bottomMarginOriginal = NOT_SET;
344
- }
345
- }
346
- }
347
- }
348
- }
349
-
350
- /**
351
- * Iterates over children and restores their original dimensions that were changed for
352
- * percentage values.
353
- */
354
- protected static void restoreOriginalParams(ViewGroup viewGroup) {
355
- for (int i = 0, count = viewGroup.getChildCount(); i < count; i++) {
356
- View view = viewGroup.getChildAt(i);
357
- LayoutParams params = view.getLayoutParams();
358
- if (params instanceof CommonLayoutParams) {
359
- CommonLayoutParams lp = (CommonLayoutParams) params;
360
- if (lp.widthPercent > 0) {
361
- lp.width = lp.widthOriginal;
362
- }
363
- if (lp.heightPercent > 0) {
364
- lp.height = lp.heightOriginal;
365
- }
366
- if (lp.leftMarginPercent > 0) {
367
- lp.leftMargin = lp.leftMarginOriginal;
368
- }
369
- if (lp.topMarginPercent > 0) {
370
- lp.topMargin = lp.topMarginOriginal;
371
- }
372
- if (lp.rightMarginPercent > 0) {
373
- lp.rightMargin = lp.rightMarginOriginal;
374
- }
375
- if (lp.bottomMarginPercent > 0) {
376
- lp.bottomMargin = lp.bottomMarginOriginal;
377
- }
378
-
379
- lp.widthOriginal = NOT_SET;
380
- lp.heightOriginal = NOT_SET;
381
- lp.leftMarginOriginal = NOT_SET;
382
- lp.topMarginOriginal = NOT_SET;
383
- lp.rightMarginOriginal = NOT_SET;
384
- lp.bottomMarginOriginal = NOT_SET;
385
- }
386
- }
387
- }
388
-
389
- static void log(String tag, String message) {
390
- Log.v(tag, message);
391
- }
392
-
393
- static StringBuilder getStringBuilder() {
394
- sb.setLength(0);
395
- return sb;
396
- }
397
-
398
- private static int getMeasureSpec(View view, int parentMeasureSpec, boolean horizontal) {
399
-
400
- int parentLength = MeasureSpec.getSize(parentMeasureSpec);
401
- int parentSpecMode = MeasureSpec.getMode(parentMeasureSpec);
402
-
403
- CommonLayoutParams lp = (CommonLayoutParams) view.getLayoutParams();
404
- final int margins = horizontal ? lp.leftMargin + lp.rightMargin : lp.topMargin + lp.bottomMargin;
405
-
406
- int resultSize = 0;
407
- int resultMode = MeasureSpec.UNSPECIFIED;
408
-
409
- int measureLength = Math.max(0, parentLength - margins);
410
- int childLength = horizontal ? lp.width : lp.height;
411
-
412
- // We want a specific size... let be it.
413
- if (childLength >= 0) {
414
- if (parentSpecMode != MeasureSpec.UNSPECIFIED) {
415
- resultSize = Math.min(parentLength, childLength);
416
- } else {
417
- resultSize = childLength;
418
- }
419
-
420
- resultMode = MeasureSpec.EXACTLY;
421
- } else {
422
- switch (parentSpecMode) {
423
- // Parent has imposed an exact size on us
424
- case MeasureSpec.EXACTLY:
425
- resultSize = measureLength;
426
- int gravity = LayoutBase.getGravity(view);
427
- boolean stretched;
428
- if (horizontal) {
429
- final int horizontalGravity = Gravity.getAbsoluteGravity(gravity, view.getLayoutDirection()) & Gravity.HORIZONTAL_GRAVITY_MASK;
430
- stretched = horizontalGravity == Gravity.FILL_HORIZONTAL;
431
- } else {
432
- final int verticalGravity = gravity & Gravity.VERTICAL_GRAVITY_MASK;
433
- stretched = verticalGravity == Gravity.FILL_VERTICAL;
434
- }
435
-
436
- // if stretched - view wants to be our size. So be it.
437
- // else - view wants to determine its own size. It can't be bigger than us.
438
- resultMode = stretched ? MeasureSpec.EXACTLY : MeasureSpec.AT_MOST;
439
- break;
440
-
441
- // Parent has imposed a maximum size on us
442
- case MeasureSpec.AT_MOST:
443
- resultSize = measureLength;
444
- resultMode = MeasureSpec.AT_MOST;
445
- break;
446
-
447
- case MeasureSpec.UNSPECIFIED:
448
- resultSize = 0;
449
- resultMode = MeasureSpec.UNSPECIFIED;
450
- break;
451
- }
452
- }
453
-
454
- return MeasureSpec.makeMeasureSpec(resultSize, resultMode);
455
- }
456
- }
@@ -1,85 +0,0 @@
1
- /**
2
- *
3
- */
4
- package org.nativescript.widgets;
5
-
6
- import android.content.Context;
7
- import android.view.View;
8
- import android.util.AttributeSet;
9
-
10
- /**
11
- * @author hhristov
12
- *
13
- */
14
- public class ContentLayout extends LayoutBase {
15
-
16
- public ContentLayout(Context context) {
17
- this(context, null);
18
- }
19
- public ContentLayout(Context context, AttributeSet attrs) {
20
- this(context, attrs, 0);
21
- }
22
- public ContentLayout(Context context, AttributeSet attrs, int defStyleAttr) {
23
- super(context, attrs, defStyleAttr);
24
- }
25
-
26
- @Override
27
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
28
- CommonLayoutParams.adjustChildrenLayoutParams(this, widthMeasureSpec, heightMeasureSpec);
29
-
30
- int measureWidth = 0;
31
- int measureHeight = 0;
32
-
33
- for (int i = 0, count = this.getChildCount(); i < count; i++) {
34
- View child = this.getChildAt(i);
35
- if (child.getVisibility() == View.GONE) {
36
- continue;
37
- }
38
-
39
- CommonLayoutParams.measureChild(child, widthMeasureSpec, heightMeasureSpec);
40
- final int childMeasuredWidth = CommonLayoutParams.getDesiredWidth(child);
41
- final int childMeasuredHeight = CommonLayoutParams.getDesiredHeight(child);
42
-
43
- measureWidth = Math.max(measureWidth, childMeasuredWidth);
44
- measureHeight = Math.max(measureHeight, childMeasuredHeight);
45
- }
46
-
47
- // Add in our padding
48
- measureWidth += this.getPaddingLeft() + this.getPaddingRight();
49
- measureHeight += this.getPaddingTop() + this.getPaddingBottom();
50
-
51
- // Check against our minimum sizes
52
- measureWidth = Math.max(measureWidth, this.getSuggestedMinimumWidth());
53
- measureHeight = Math.max(measureHeight, this.getSuggestedMinimumHeight());
54
-
55
- int widthSizeAndState = resolveSizeAndState(measureWidth, widthMeasureSpec, 0);
56
- int heightSizeAndState = resolveSizeAndState(measureHeight, heightMeasureSpec, 0);
57
-
58
- this.setMeasuredDimension(widthSizeAndState, heightSizeAndState);
59
- }
60
-
61
- @Override
62
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
63
- int paddingLeft = this.getPaddingLeft();
64
- int paddingRight = this.getPaddingRight();
65
- int paddingTop = this.getPaddingTop();
66
- int paddingBottom = this.getPaddingBottom();
67
-
68
- int childLeft = paddingLeft;
69
- int childTop = paddingTop;
70
-
71
- int childRight = right - left - (paddingLeft + paddingRight);
72
- int childBottom = bottom - top - (paddingRight + paddingBottom);
73
-
74
- for (int i = 0, count = this.getChildCount(); i < count; i++) {
75
- View child = this.getChildAt(i);
76
- if (child.getVisibility() == View.GONE) {
77
- continue;
78
- }
79
-
80
- CommonLayoutParams.layoutChild(child, childLeft, childTop, childRight, childBottom);
81
- }
82
-
83
- CommonLayoutParams.restoreOriginalParams(this);
84
- }
85
- }
@@ -1,135 +0,0 @@
1
- package org.nativescript.widgets;
2
-
3
- import android.animation.Animator;
4
- import android.animation.AnimatorListenerAdapter;
5
- import android.animation.AnimatorSet;
6
- import android.view.View;
7
- import android.view.ViewGroup;
8
- import android.view.animation.Interpolator;
9
-
10
- import androidx.annotation.NonNull;
11
- import androidx.annotation.Nullable;
12
- import androidx.core.view.ViewCompat;
13
- import androidx.transition.Transition;
14
- import androidx.transition.TransitionListenerAdapter;
15
- import androidx.transition.TransitionValues;
16
- import androidx.transition.Visibility;
17
-
18
- import java.util.ArrayList;
19
-
20
- public class CustomTransition extends Visibility {
21
- private boolean resetOnTransitionEnd;
22
- private final AnimatorSet animatorSet;
23
- private AnimatorSet immediateAnimatorSet;
24
- private final String transitionName;
25
-
26
- public CustomTransition(AnimatorSet animatorSet, String transitionName) {
27
- this.animatorSet = animatorSet;
28
- this.transitionName = transitionName;
29
- }
30
-
31
- @Nullable
32
- @Override
33
- public Animator onAppear(@NonNull ViewGroup sceneRoot, @NonNull final View view, @Nullable TransitionValues startValues,
34
- @Nullable TransitionValues endValues) {
35
- if (endValues == null || view == null || this.animatorSet == null) {
36
- return null;
37
- }
38
-
39
- return this.setAnimatorsTarget(this.animatorSet, view);
40
- }
41
-
42
- @Override
43
- public Animator onDisappear(@NonNull ViewGroup sceneRoot, @NonNull final View view, @Nullable TransitionValues startValues,
44
- @Nullable TransitionValues endValues) {
45
- if (startValues == null || view == null || this.animatorSet == null) {
46
- return null;
47
- }
48
-
49
- return this.setAnimatorsTarget(this.animatorSet, view);
50
- }
51
-
52
- public void setResetOnTransitionEnd(boolean resetOnTransitionEnd) {
53
- this.resetOnTransitionEnd = resetOnTransitionEnd;
54
- }
55
-
56
- public String getTransitionName() {
57
- return this.transitionName;
58
- }
59
-
60
- private Animator setAnimatorsTarget(AnimatorSet animatorSet, final View view) {
61
- ArrayList<Animator> animatorsList = animatorSet.getChildAnimations();
62
- boolean resetOnTransitionEnd = this.resetOnTransitionEnd;
63
-
64
- for (int i = 0; i < animatorsList.size(); i++) {
65
- animatorsList.get(i).setTarget(view);
66
- }
67
-
68
- // Reset animation to its initial state to prevent mirrorered effect
69
- if (this.resetOnTransitionEnd) {
70
- this.immediateAnimatorSet = this.animatorSet.clone();
71
- }
72
-
73
- // Switching to hardware layer during transition to improve animation performance
74
- CustomAnimatorListener listener = new CustomAnimatorListener(view);
75
- animatorSet.addListener(listener);
76
- this.addListener(new CustomTransitionListenerAdapter(this));
77
-
78
- return this.animatorSet;
79
- }
80
-
81
- private class ReverseInterpolator implements Interpolator {
82
- @Override
83
- public float getInterpolation(float paramFloat) {
84
- return Math.abs(paramFloat - 1f);
85
- }
86
- }
87
-
88
- private class CustomTransitionListenerAdapter extends TransitionListenerAdapter {
89
- private CustomTransition customTransition;
90
-
91
- CustomTransitionListenerAdapter(CustomTransition transition) {
92
- this.customTransition = transition;
93
- }
94
-
95
- @Override
96
- public void onTransitionEnd(@NonNull Transition transition) {
97
- if (this.customTransition.resetOnTransitionEnd) {
98
- this.customTransition.immediateAnimatorSet.setDuration(0);
99
- this.customTransition.immediateAnimatorSet.setInterpolator(new ReverseInterpolator());
100
- this.customTransition.immediateAnimatorSet.start();
101
- this.customTransition.setResetOnTransitionEnd(false);
102
- }
103
-
104
- this.customTransition.immediateAnimatorSet = null;
105
- this.customTransition = null;
106
- transition.removeListener(this);
107
- }
108
- }
109
-
110
- private static class CustomAnimatorListener extends AnimatorListenerAdapter {
111
-
112
- private final View mView;
113
- private boolean mLayerTypeChanged = false;
114
-
115
- CustomAnimatorListener(View view) {
116
- mView = view;
117
- }
118
-
119
- @Override
120
- public void onAnimationStart(Animator animation) {
121
- if (ViewCompat.hasOverlappingRendering(mView)
122
- && mView.getLayerType() == View.LAYER_TYPE_NONE) {
123
- mLayerTypeChanged = true;
124
- mView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
125
- }
126
- }
127
-
128
- @Override
129
- public void onAnimationEnd(Animator animation) {
130
- if (mLayerTypeChanged) {
131
- mView.setLayerType(View.LAYER_TYPE_NONE, null);
132
- }
133
- }
134
- }
135
- }