File tree Expand file tree Collapse file tree 4 files changed +11
-14
lines changed
android/src/main/java/com/reactnativecomponent/splashscreen
RCTSplashScreen/RCTSplashScreen Expand file tree Collapse file tree 4 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,11 @@ protected static Activity getActivity() {
3232 }
3333
3434 public static void openSplashScreen (Activity activity ) {
35- openSplashScreen (activity , false , ImageView .ScaleType .FIT_XY );
35+ openSplashScreen (activity , false );
36+ }
37+
38+ public static void openSplashScreen (Activity activity , boolean isFullScreen ) {
39+ openSplashScreen (activity , isFullScreen , ImageView .ScaleType .CENTER_CROP );
3640 }
3741
3842 public static void openSplashScreen (final Activity activity , final boolean isFullScreen , final ImageView .ScaleType scaleType ) {
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ + (void)open:(RCTRootView *)v withImageNamed:(NSString *)imageName {
2323 UIImageView *view = [[UIImageView alloc ]initWithFrame:[UIScreen mainScreen ].bounds];
2424
2525 view.image = [UIImage imageNamed: imageName];
26-
26+ view.contentMode = UIViewContentModeScaleAspectFill;
27+
2728 [[NSNotificationCenter defaultCenter ] removeObserver: rootView name: RCTContentDidAppearNotification object: rootView];
2829
2930 [rootView setLoadingView: view];
Original file line number Diff line number Diff line change 55 <plugIn identifier =" com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version =" 10085" />
66 </dependencies >
77 <objects >
8- <placeholder placeholderIdentifier =" IBFilesOwner" id =" -1" userLabel =" File's Owner" />
9- <placeholder placeholderIdentifier =" IBFirstResponder" id =" -2" customClass =" UIResponder" />
10- <view contentMode =" scaleToFill" id =" iN0-l3-epB" >
11- <rect key =" frame" x =" 0.0" y =" 0.0" width =" 480" height =" 480" />
12- <autoresizingMask key =" autoresizingMask" widthSizable =" YES" heightSizable =" YES" />
8+ <view contentMode =" scaleAspectFill" id =" iN0-l3-epB" >
139 <subviews >
14- <imageView userInteractionEnabled =" NO" contentMode =" scaleToFill" horizontalHuggingPriority =" 251" verticalHuggingPriority =" 251" image =" splash.png" translatesAutoresizingMaskIntoConstraints =" NO" id =" ZkI-RL-69Z" >
15- <rect key =" frame" x =" 0.0" y =" 0.0" width =" 480" height =" 480" />
10+ <imageView userInteractionEnabled =" NO" contentMode =" scaleAspectFill" image =" splash.png" translatesAutoresizingMaskIntoConstraints =" NO" id =" ZkI-RL-69Z" >
1611 </imageView >
1712 </subviews >
1813 <color key =" backgroundColor" white =" 1" alpha =" 1" colorSpace =" custom" customColorSpace =" calibratedWhite" />
2217 <constraint firstAttribute =" bottom" secondItem =" ZkI-RL-69Z" secondAttribute =" bottom" id =" afY-hI-KgI" />
2318 <constraint firstItem =" ZkI-RL-69Z" firstAttribute =" leading" secondItem =" iN0-l3-epB" secondAttribute =" leading" id =" eMX-qT-GeJ" />
2419 </constraints >
25- <nil key =" simulatedStatusBarMetrics" />
26- <freeformSimulatedSizeMetrics key =" simulatedDestinationMetrics" />
27- <point key =" canvasLocation" x =" 548" y =" 455" />
2820 </view >
2921 </objects >
3022 <resources >
31- <image name =" splash.png" width = " 720 " height = " 1280 " />
23+ <image name =" splash.png" />
3224 </resources >
3325</document >
Original file line number Diff line number Diff line change 88 },
99 "repository" : {
1010 "type" : " git" ,
11- "url" : " git+https://github.com/react-native-component /react-native-smart-splash-screen.git"
11+ "url" : " git+https://github.com/FiW /react-native-smart-splash-screen.git"
1212 },
1313 "keywords" : [
1414 " react-native" ,
You can’t perform that action at this time.
0 commit comments