@nativescript/core 9.0.0-next-09-27-2025-18063560861 → 9.0.0-next-10-06-2025-18277360121
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.
- package/package.json +1 -1
- package/platforms/android/include.gradle +51 -0
- package/platforms/android/java/org/nativescript/Process.java +59 -0
- package/platforms/android/java/org/nativescript/widgets/AbsoluteLayout.java +88 -0
- package/platforms/android/java/org/nativescript/widgets/AnimatorHelper.java +61 -0
- package/platforms/android/java/org/nativescript/widgets/Async.java +1356 -0
- package/platforms/android/java/org/nativescript/widgets/BorderDrawable.java +936 -0
- package/platforms/android/java/org/nativescript/widgets/BottomNavigationBar.java +308 -0
- package/platforms/android/java/org/nativescript/widgets/BoxShadowDrawable.java +175 -0
- package/platforms/android/java/org/nativescript/widgets/CSSValue.java +34 -0
- package/platforms/android/java/org/nativescript/widgets/CommonLayoutParams.java +456 -0
- package/platforms/android/java/org/nativescript/widgets/ContentLayout.java +85 -0
- package/platforms/android/java/org/nativescript/widgets/CustomTransition.java +135 -0
- package/platforms/android/java/org/nativescript/widgets/CustomTypefaceSpan.java +44 -0
- package/platforms/android/java/org/nativescript/widgets/Dock.java +15 -0
- package/platforms/android/java/org/nativescript/widgets/DockLayout.java +185 -0
- package/platforms/android/java/org/nativescript/widgets/FileHelper.java +815 -0
- package/platforms/android/java/org/nativescript/widgets/FlexLine.java +177 -0
- package/platforms/android/java/org/nativescript/widgets/FlexboxLayout.java +2769 -0
- package/platforms/android/java/org/nativescript/widgets/FragmentBase.java +14 -0
- package/platforms/android/java/org/nativescript/widgets/GridLayout.java +1172 -0
- package/platforms/android/java/org/nativescript/widgets/GridUnitType.java +10 -0
- package/platforms/android/java/org/nativescript/widgets/HorizontalScrollView.java +256 -0
- package/platforms/android/java/org/nativescript/widgets/ImageView.java +423 -0
- package/platforms/android/java/org/nativescript/widgets/ItemSpec.java +56 -0
- package/platforms/android/java/org/nativescript/widgets/LayoutBase.java +98 -0
- package/platforms/android/java/org/nativescript/widgets/LinearGradientDefinition.java +46 -0
- package/platforms/android/java/org/nativescript/widgets/Orientation.java +9 -0
- package/platforms/android/java/org/nativescript/widgets/OriginPoint.java +74 -0
- package/platforms/android/java/org/nativescript/widgets/ScrollSavedState.java +63 -0
- package/platforms/android/java/org/nativescript/widgets/SegmentedBarColorDrawable.java +27 -0
- package/platforms/android/java/org/nativescript/widgets/StackLayout.java +231 -0
- package/platforms/android/java/org/nativescript/widgets/StyleableTextView.java +50 -0
- package/platforms/android/java/org/nativescript/widgets/TabIconRenderingMode.java +6 -0
- package/platforms/android/java/org/nativescript/widgets/TabItemSpec.java +15 -0
- package/platforms/android/java/org/nativescript/widgets/TabLayout.java +451 -0
- package/platforms/android/java/org/nativescript/widgets/TabStrip.java +294 -0
- package/platforms/android/java/org/nativescript/widgets/TabViewPager.java +64 -0
- package/platforms/android/java/org/nativescript/widgets/TabsBar.java +443 -0
- package/platforms/android/java/org/nativescript/widgets/Utils.java +546 -0
- package/platforms/android/java/org/nativescript/widgets/VerticalScrollView.java +258 -0
- package/platforms/android/java/org/nativescript/widgets/ViewHelper.java +564 -0
- package/platforms/android/java/org/nativescript/widgets/WrapLayout.java +252 -0
- package/platforms/android/java/org/nativescript/widgets/image/AsyncTask.java +679 -0
- package/platforms/android/java/org/nativescript/widgets/image/BitmapOwner.java +17 -0
- package/platforms/android/java/org/nativescript/widgets/image/Cache.java +471 -0
- package/platforms/android/java/org/nativescript/widgets/image/DiskLruCache.java +970 -0
- package/platforms/android/java/org/nativescript/widgets/image/Fetcher.java +747 -0
- package/platforms/android/java/org/nativescript/widgets/image/Utils.java +58 -0
- package/platforms/android/java/org/nativescript/widgets/image/Worker.java +571 -0
- package/platforms/ios/src/TNSWidgets/Info.plist +26 -0
- package/platforms/ios/src/TNSWidgets/NSData+Async.m +42 -0
- package/platforms/ios/src/TNSWidgets/NSFileHandle+Async.m +82 -0
- package/platforms/ios/src/TNSWidgets/NSObject+Swizzling.m +68 -0
- package/platforms/ios/src/TNSWidgets/NSString+Async.m +51 -0
- package/platforms/ios/src/TNSWidgets/TNSLabel.m +42 -0
- package/platforms/ios/src/TNSWidgets/UIImage+TNSBlocks.m +77 -0
- package/platforms/ios/src/TNSWidgets/UIView+PassThroughParent.m +53 -0
- package/platforms/ios/src/TNSWidgets/UIView+PropertyBag.m +72 -0
- package/platforms/ios/src/module.modulemap +5 -0
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/ios/TNSWidgets.xcframework/Info.plist +0 -102
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +0 -52
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSCCrypto.h +0 -60
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSData+Async.h +0 -24
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSFileHandle+Async.h +0 -22
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSString+Async.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSLabel.h +0 -16
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSProcess.h +0 -29
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSWidgets.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/UIImage+TNSBlocks.h +0 -26
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/UIView+PassThroughParent.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Modules/module.modulemap +0 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/PrivateHeaders/NSObject+Swizzling.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/PrivateHeaders/UIView+PropertyBag.h +0 -18
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist +0 -52
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSCCrypto.h +0 -60
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSData+Async.h +0 -24
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSFileHandle+Async.h +0 -22
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/NSString+Async.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSLabel.h +0 -16
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSProcess.h +0 -29
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/TNSWidgets.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIImage+TNSBlocks.h +0 -26
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Headers/UIView+PassThroughParent.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Modules/module.modulemap +0 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/NSObject+Swizzling.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/PrivateHeaders/UIView+PropertyBag.h +0 -18
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/Resources/Info.plist +0 -52
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +0 -82
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +0 -223
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +0 -82
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSCCrypto.h +0 -60
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSData+Async.h +0 -24
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +0 -22
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSString+Async.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSLabel.h +0 -16
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSProcess.h +0 -29
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +0 -25
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +0 -26
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/Modules/module.modulemap +0 -6
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +0 -17
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +0 -18
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +0 -223
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/aarch64/TNSWidgets.yml +0 -82
- package/platforms/ios/TNSWidgets.xcframework/xros-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/Relocations/x86_64/TNSWidgets.yml +0 -82
- /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/NSData+Async.h +0 -0
- /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/NSFileHandle+Async.h +0 -0
- /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/PrivateHeaders → src/TNSWidgets}/NSObject+Swizzling.h +0 -0
- /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/NSString+Async.h +0 -0
- /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/TNSLabel.h +0 -0
- /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/TNSWidgets.h +0 -0
- /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/UIImage+TNSBlocks.h +0 -0
- /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers → src/TNSWidgets}/UIView+PassThroughParent.h +0 -0
- /package/platforms/ios/{TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/PrivateHeaders → src/TNSWidgets}/UIView+PropertyBag.h +0 -0
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
package org.nativescript.widgets;
|
|
2
|
+
|
|
3
|
+
import android.annotation.TargetApi;
|
|
4
|
+
import android.graphics.Rect;
|
|
5
|
+
import android.view.Gravity;
|
|
6
|
+
import android.view.ViewGroup;
|
|
7
|
+
import android.widget.FrameLayout;
|
|
8
|
+
import android.widget.TextView;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Created by hhristov on 8/23/16.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
public class ViewHelper {
|
|
15
|
+
private ViewHelper() {
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static final int version = android.os.Build.VERSION.SDK_INT;
|
|
20
|
+
|
|
21
|
+
public static int getMinWidth(android.view.View view) {
|
|
22
|
+
return view.getMinimumWidth();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public static void setMinWidth(android.view.View view, int value) {
|
|
26
|
+
if (view instanceof TextView) {
|
|
27
|
+
((android.widget.TextView) view).setMinWidth(value);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
view.setMinimumWidth(value);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public static int getMinHeight(android.view.View view) {
|
|
34
|
+
return view.getMinimumHeight();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public static void setMinHeight(android.view.View view, int value) {
|
|
38
|
+
if (view instanceof TextView) {
|
|
39
|
+
((android.widget.TextView) view).setMinHeight(value);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
view.setMinimumHeight(value);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public static int getWidth(android.view.View view) {
|
|
46
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
47
|
+
if (params != null) {
|
|
48
|
+
return params.width;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return ViewGroup.LayoutParams.MATCH_PARENT;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public static void setWidth(android.view.View view, int value) {
|
|
55
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
56
|
+
if (params == null) {
|
|
57
|
+
params = new CommonLayoutParams();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
params.width = value;
|
|
61
|
+
if (params instanceof CommonLayoutParams) {
|
|
62
|
+
((CommonLayoutParams) params).widthPercent = -1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
view.setLayoutParams(params);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public static void setWidthPercent(android.view.View view, float value) {
|
|
69
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
70
|
+
if (params == null) {
|
|
71
|
+
params = new CommonLayoutParams();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (params instanceof CommonLayoutParams) {
|
|
75
|
+
CommonLayoutParams lp = (CommonLayoutParams) params;
|
|
76
|
+
lp.widthPercent = value;
|
|
77
|
+
lp.width = (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.FILL_HORIZONTAL
|
|
78
|
+
? ViewGroup.LayoutParams.MATCH_PARENT
|
|
79
|
+
: ViewGroup.LayoutParams.WRAP_CONTENT;
|
|
80
|
+
view.setLayoutParams(params);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
public static int getHeight(android.view.View view) {
|
|
85
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
86
|
+
if (params != null) {
|
|
87
|
+
return params.height;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return ViewGroup.LayoutParams.MATCH_PARENT;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
public static void setHeight(android.view.View view, int value) {
|
|
94
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
95
|
+
if (params == null) {
|
|
96
|
+
params = new CommonLayoutParams();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
params.height = value;
|
|
100
|
+
if (params instanceof CommonLayoutParams) {
|
|
101
|
+
((CommonLayoutParams) params).heightPercent = -1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
view.setLayoutParams(params);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
public static void setHeightPercent(android.view.View view, float value) {
|
|
108
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
109
|
+
if (params == null) {
|
|
110
|
+
params = new CommonLayoutParams();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (params instanceof CommonLayoutParams) {
|
|
114
|
+
CommonLayoutParams lp = (CommonLayoutParams) params;
|
|
115
|
+
lp.heightPercent = value;
|
|
116
|
+
lp.height = (lp.gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.FILL_VERTICAL
|
|
117
|
+
? ViewGroup.LayoutParams.MATCH_PARENT
|
|
118
|
+
: ViewGroup.LayoutParams.WRAP_CONTENT;
|
|
119
|
+
view.setLayoutParams(params);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
public static Rect getMargin(android.view.View view) {
|
|
124
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
125
|
+
if (params instanceof ViewGroup.MarginLayoutParams) {
|
|
126
|
+
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) params;
|
|
127
|
+
return new Rect(lp.leftMargin, lp.topMargin, lp.rightMargin, lp.bottomMargin);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return new Rect();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
public static void setMargin(android.view.View view, int left, int top, int right, int bottom) {
|
|
134
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
135
|
+
// Initialize if empty.
|
|
136
|
+
if (params == null) {
|
|
137
|
+
params = new CommonLayoutParams();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Set margins only if params are of the correct type.
|
|
141
|
+
if (params instanceof ViewGroup.MarginLayoutParams) {
|
|
142
|
+
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) params;
|
|
143
|
+
lp.leftMargin = left;
|
|
144
|
+
lp.topMargin = top;
|
|
145
|
+
lp.rightMargin = right;
|
|
146
|
+
lp.bottomMargin = bottom;
|
|
147
|
+
view.setLayoutParams(params);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
public static int getMarginLeft(android.view.View view) {
|
|
152
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
153
|
+
if (params instanceof ViewGroup.MarginLayoutParams) {
|
|
154
|
+
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) params;
|
|
155
|
+
return lp.leftMargin;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
public static void setMarginLeft(android.view.View view, int value) {
|
|
162
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
163
|
+
// Initialize if empty.
|
|
164
|
+
if (params == null) {
|
|
165
|
+
params = new CommonLayoutParams();
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Set margins only if params are of the correct type.
|
|
169
|
+
if (params instanceof ViewGroup.MarginLayoutParams) {
|
|
170
|
+
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) params;
|
|
171
|
+
lp.leftMargin = value;
|
|
172
|
+
view.setLayoutParams(params);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (params instanceof CommonLayoutParams) {
|
|
176
|
+
CommonLayoutParams lp = (CommonLayoutParams) params;
|
|
177
|
+
lp.leftMarginPercent = -1;
|
|
178
|
+
view.setLayoutParams(params);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
public static void setMarginLeftPercent(android.view.View view, float value) {
|
|
183
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
184
|
+
if (params == null) {
|
|
185
|
+
params = new CommonLayoutParams();
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (params instanceof CommonLayoutParams) {
|
|
189
|
+
CommonLayoutParams lp = (CommonLayoutParams) params;
|
|
190
|
+
lp.leftMargin = 0;
|
|
191
|
+
lp.leftMarginPercent = value;
|
|
192
|
+
view.setLayoutParams(params);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
public static int getMarginTop(android.view.View view) {
|
|
197
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
198
|
+
if (params instanceof ViewGroup.MarginLayoutParams) {
|
|
199
|
+
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) params;
|
|
200
|
+
return lp.topMargin;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return 0;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
public static void setMarginTop(android.view.View view, int value) {
|
|
207
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
208
|
+
// Initialize if empty.
|
|
209
|
+
if (params == null) {
|
|
210
|
+
params = new CommonLayoutParams();
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Set margins only if params are of the correct type.
|
|
214
|
+
if (params instanceof ViewGroup.MarginLayoutParams) {
|
|
215
|
+
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) params;
|
|
216
|
+
lp.topMargin = value;
|
|
217
|
+
view.setLayoutParams(params);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (params instanceof CommonLayoutParams) {
|
|
221
|
+
CommonLayoutParams lp = (CommonLayoutParams) params;
|
|
222
|
+
lp.topMarginPercent = -1;
|
|
223
|
+
view.setLayoutParams(params);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
public static void setMarginTopPercent(android.view.View view, float value) {
|
|
228
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
229
|
+
if (params == null) {
|
|
230
|
+
params = new CommonLayoutParams();
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (params instanceof CommonLayoutParams) {
|
|
234
|
+
CommonLayoutParams lp = (CommonLayoutParams) params;
|
|
235
|
+
lp.topMargin = 0;
|
|
236
|
+
lp.topMarginPercent = value;
|
|
237
|
+
view.setLayoutParams(params);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
public static int getMarginRight(android.view.View view) {
|
|
242
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
243
|
+
if (params instanceof ViewGroup.MarginLayoutParams) {
|
|
244
|
+
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) params;
|
|
245
|
+
return lp.rightMargin;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
return 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
public static void setMarginRight(android.view.View view, int value) {
|
|
252
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
253
|
+
// Initialize if empty.
|
|
254
|
+
if (params == null) {
|
|
255
|
+
params = new CommonLayoutParams();
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// Set margins only if params are of the correct type.
|
|
259
|
+
if (params instanceof ViewGroup.MarginLayoutParams) {
|
|
260
|
+
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) params;
|
|
261
|
+
lp.rightMargin = value;
|
|
262
|
+
view.setLayoutParams(params);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (params instanceof CommonLayoutParams) {
|
|
266
|
+
CommonLayoutParams lp = (CommonLayoutParams) params;
|
|
267
|
+
lp.rightMarginPercent = -1;
|
|
268
|
+
view.setLayoutParams(params);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
public static void setMarginRightPercent(android.view.View view, float value) {
|
|
273
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
274
|
+
if (params == null) {
|
|
275
|
+
params = new CommonLayoutParams();
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (params instanceof CommonLayoutParams) {
|
|
279
|
+
CommonLayoutParams lp = (CommonLayoutParams) params;
|
|
280
|
+
lp.rightMargin = 0;
|
|
281
|
+
lp.rightMarginPercent = value;
|
|
282
|
+
view.setLayoutParams(params);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
public static int getMarginBottom(android.view.View view) {
|
|
287
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
288
|
+
if (params instanceof ViewGroup.MarginLayoutParams) {
|
|
289
|
+
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) params;
|
|
290
|
+
return lp.bottomMargin;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return 0;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
public static void setMarginBottom(android.view.View view, int value) {
|
|
297
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
298
|
+
// Initialize if empty.
|
|
299
|
+
if (params == null) {
|
|
300
|
+
params = new CommonLayoutParams();
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// Set margins only if params are of the correct type.
|
|
304
|
+
if (params instanceof ViewGroup.MarginLayoutParams) {
|
|
305
|
+
ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) params;
|
|
306
|
+
lp.bottomMargin = value;
|
|
307
|
+
view.setLayoutParams(params);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (params instanceof CommonLayoutParams) {
|
|
311
|
+
CommonLayoutParams lp = (CommonLayoutParams) params;
|
|
312
|
+
lp.bottomMarginPercent = -1;
|
|
313
|
+
view.setLayoutParams(params);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
public static void setMarginBottomPercent(android.view.View view, float value) {
|
|
318
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
319
|
+
if (params == null) {
|
|
320
|
+
params = new CommonLayoutParams();
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (params instanceof CommonLayoutParams) {
|
|
324
|
+
CommonLayoutParams lp = (CommonLayoutParams) params;
|
|
325
|
+
lp.bottomMargin = 0;
|
|
326
|
+
lp.bottomMarginPercent = value;
|
|
327
|
+
view.setLayoutParams(params);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
public static String getHorizontalAlignment(android.view.View view) {
|
|
332
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
333
|
+
if (params instanceof FrameLayout.LayoutParams) {
|
|
334
|
+
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) params;
|
|
335
|
+
if (Gravity.isHorizontal(lp.gravity)) {
|
|
336
|
+
switch (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK) {
|
|
337
|
+
case Gravity.LEFT:
|
|
338
|
+
return "left";
|
|
339
|
+
case Gravity.CENTER:
|
|
340
|
+
return "center";
|
|
341
|
+
case Gravity.RIGHT:
|
|
342
|
+
return "right";
|
|
343
|
+
case Gravity.FILL_HORIZONTAL:
|
|
344
|
+
return "stretch";
|
|
345
|
+
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
return "stretch";
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
public static void setHorizontalAlignment(android.view.View view, String value) {
|
|
354
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
355
|
+
// Initialize if empty.
|
|
356
|
+
if (params == null) {
|
|
357
|
+
params = new CommonLayoutParams();
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// Set margins only if params are of the correct type.
|
|
361
|
+
if (params instanceof FrameLayout.LayoutParams) {
|
|
362
|
+
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) params;
|
|
363
|
+
switch (value) {
|
|
364
|
+
case "left":
|
|
365
|
+
lp.gravity = Gravity.LEFT | (lp.gravity & Gravity.VERTICAL_GRAVITY_MASK);
|
|
366
|
+
break;
|
|
367
|
+
case "center":
|
|
368
|
+
case "middle":
|
|
369
|
+
lp.gravity = Gravity.CENTER_HORIZONTAL | (lp.gravity & Gravity.VERTICAL_GRAVITY_MASK);
|
|
370
|
+
break;
|
|
371
|
+
case "right":
|
|
372
|
+
lp.gravity = Gravity.RIGHT | (lp.gravity & Gravity.VERTICAL_GRAVITY_MASK);
|
|
373
|
+
break;
|
|
374
|
+
case "stretch":
|
|
375
|
+
lp.gravity = Gravity.FILL_HORIZONTAL | (lp.gravity & Gravity.VERTICAL_GRAVITY_MASK);
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
view.setLayoutParams(params);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
public static String getVerticalAlignment(android.view.View view) {
|
|
383
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
384
|
+
if (params instanceof FrameLayout.LayoutParams) {
|
|
385
|
+
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) params;
|
|
386
|
+
if (Gravity.isHorizontal(lp.gravity)) {
|
|
387
|
+
switch (lp.gravity & Gravity.VERTICAL_GRAVITY_MASK) {
|
|
388
|
+
case Gravity.TOP:
|
|
389
|
+
return "top";
|
|
390
|
+
case Gravity.CENTER:
|
|
391
|
+
return "center";
|
|
392
|
+
case Gravity.BOTTOM:
|
|
393
|
+
return "bottom";
|
|
394
|
+
case Gravity.FILL_VERTICAL:
|
|
395
|
+
return "stretch";
|
|
396
|
+
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
return "stretch";
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
public static void setVerticalAlignment(android.view.View view, String value) {
|
|
405
|
+
ViewGroup.LayoutParams params = view.getLayoutParams();
|
|
406
|
+
// Initialize if empty.
|
|
407
|
+
if (params == null) {
|
|
408
|
+
params = new CommonLayoutParams();
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// Set margins only if params are of the correct type.
|
|
412
|
+
if (params instanceof FrameLayout.LayoutParams) {
|
|
413
|
+
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) params;
|
|
414
|
+
switch (value) {
|
|
415
|
+
case "top":
|
|
416
|
+
lp.gravity = Gravity.TOP | (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
|
417
|
+
break;
|
|
418
|
+
case "center":
|
|
419
|
+
case "middle":
|
|
420
|
+
lp.gravity = Gravity.CENTER_VERTICAL | (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
|
421
|
+
break;
|
|
422
|
+
case "bottom":
|
|
423
|
+
lp.gravity = Gravity.BOTTOM | (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
|
424
|
+
break;
|
|
425
|
+
case "stretch":
|
|
426
|
+
lp.gravity = Gravity.FILL_VERTICAL | (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
view.setLayoutParams(params);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
public static Rect getPadding(android.view.View view) {
|
|
434
|
+
return new Rect(view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(), view.getPaddingBottom());
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
public static void setPadding(android.view.View view, int left, int top, int right, int bottom) {
|
|
438
|
+
view.setPadding(left, top, right, bottom);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
public static int getPaddingLeft(android.view.View view) {
|
|
442
|
+
return view.getPaddingLeft();
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
public static void setPaddingLeft(android.view.View view, int value) {
|
|
446
|
+
view.setPadding(value, view.getPaddingTop(), view.getPaddingRight(), view.getPaddingBottom());
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
public static int getPaddingTop(android.view.View view) {
|
|
450
|
+
return view.getPaddingTop();
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
public static void setPaddingTop(android.view.View view, int value) {
|
|
454
|
+
view.setPadding(view.getPaddingLeft(), value, view.getPaddingRight(), view.getPaddingBottom());
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
public static int getPaddingRight(android.view.View view) {
|
|
458
|
+
return view.getPaddingRight();
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
public static void setPaddingRight(android.view.View view, int value) {
|
|
462
|
+
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), value, view.getPaddingBottom());
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
public static int getPaddingBottom(android.view.View view) {
|
|
466
|
+
return view.getPaddingBottom();
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
public static void setPaddingBottom(android.view.View view, int value) {
|
|
470
|
+
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(), value);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
public static float getRotate(android.view.View view) {
|
|
474
|
+
return view.getRotation();
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
public static void setRotate(android.view.View view, float value) {
|
|
478
|
+
view.setRotation(value);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
public static float getRotateX(android.view.View view) {
|
|
482
|
+
return view.getRotationX();
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
public static void setRotateX(android.view.View view, float value) {
|
|
486
|
+
view.setRotationX(value);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
public static float getRotateY(android.view.View view) {
|
|
490
|
+
return view.getRotationY();
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
public static void setRotateY(android.view.View view, float value) {
|
|
494
|
+
view.setRotationY(value);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
public static void setPerspective(android.view.View view, float value) {
|
|
498
|
+
view.setCameraDistance(value);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
public static float getScaleX(android.view.View view) {
|
|
502
|
+
return view.getScaleX();
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
public static void setScaleX(android.view.View view, float value) {
|
|
506
|
+
view.setScaleX(value);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
public static float getScaleY(android.view.View view) {
|
|
510
|
+
return view.getScaleY();
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
public static void setScaleY(android.view.View view, float value) {
|
|
514
|
+
view.setScaleY(value);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
public static float getTranslateX(android.view.View view) {
|
|
518
|
+
return view.getTranslationX();
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
public static void setTranslateX(android.view.View view, float value) {
|
|
522
|
+
view.setTranslationX(value);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
public static float getTranslateY(android.view.View view) {
|
|
526
|
+
return view.getTranslationY();
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
public static void setTranslateY(android.view.View view, float value) {
|
|
530
|
+
view.setTranslationY(value);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
@TargetApi(21)
|
|
534
|
+
public static float getZIndex(android.view.View view) {
|
|
535
|
+
if (ViewHelper.version >= 21) {
|
|
536
|
+
return view.getZ();
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
return 0;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
@TargetApi(21)
|
|
543
|
+
public static void setZIndex(android.view.View view, float value) {
|
|
544
|
+
if (ViewHelper.version >= 21) {
|
|
545
|
+
view.setZ(value);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
@TargetApi(21)
|
|
550
|
+
public static float getLetterspacing(android.widget.TextView textView) {
|
|
551
|
+
if (ViewHelper.version >= 21) {
|
|
552
|
+
return textView.getLetterSpacing();
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
return 0;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
@TargetApi(21)
|
|
559
|
+
public static void setLetterspacing(android.widget.TextView textView, float value) {
|
|
560
|
+
if (ViewHelper.version >= 21) {
|
|
561
|
+
textView.setLetterSpacing(value);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|