Skip to content

Commit

Permalink
feat(launch-screen): added & adjusted native launch screens
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterds committed Jul 5, 2023
1 parent 9da2dfb commit d2e7d3d
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 42 deletions.
Binary file added android/app/src/main/res/drawable/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions android/app/src/main/res/layout/launch_screen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg"
>
<ImageView
android:src="@drawable/logo"
android:layout_gravity="center"
android:layout_width="128dp"
android:layout_height="113dp" />
</FrameLayout>
40 changes: 20 additions & 20 deletions ios/Example-tvOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Fontisto.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
Expand Down Expand Up @@ -56,8 +37,27 @@
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Fontisto.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<string>LaunchScreen.storyboard</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
Expand Down
41 changes: 41 additions & 0 deletions ios/Example-tvOS/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder.AppleTV.Storyboard" version="3.0" toolsVersion="21701" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="u0a-ij-WvE">
<device id="appleTV" appearance="light"/>
<dependencies>
<deployment identifier="tvOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="3ge-oh-zpQ">
<objects>
<viewController id="u0a-ij-WvE" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Qpd-SE-jP2"/>
<viewControllerLayoutGuide type="bottom" id="TeC-2V-PFX"/>
</layoutGuides>
<view key="view" userInteractionEnabled="NO" contentMode="scaleToFill" id="2x8-OU-r8C">
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Logo" translatesAutoresizingMaskIntoConstraints="NO" id="aRu-AK-Wex">
<rect key="frame" x="832" y="428" width="256" height="225"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="sNj-2H-BDP"/>
<color key="backgroundColor" red="0.074569292369999998" green="0.082317329940000003" blue="0.10196382549999999" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="YUM-Ef-YDA" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="52.173913043478265" y="375"/>
</scene>
</scenes>
<resources>
<image name="Logo" width="200" height="176"/>
</resources>
</document>
4 changes: 4 additions & 0 deletions ios/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
2DCD954D1E0B4F2C00145EB5 /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleTests.m */; };
3CC675522A55861100A1B4E3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3CC675512A55861100A1B4E3 /* LaunchScreen.storyboard */; };
41BF5F3596F87FEE707DDD11 /* libPods-Example-ExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F21F13455730034D850CD1C /* libPods-Example-ExampleTests.a */; };
47EB63F3390701B2260096C6 /* libPods-Example-tvOS-Example-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0216F1136BF7C90703C880F /* libPods-Example-tvOS-Example-tvOSTests.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
Expand Down Expand Up @@ -58,6 +59,7 @@
36771B2C8C43AC6099096637 /* Pods-Example-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
388308430DF4BE056B0CEF13 /* Pods-Example-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOS.release.xcconfig"; path = "Target Support Files/Pods-Example-tvOS/Pods-Example-tvOS.release.xcconfig"; sourceTree = "<group>"; };
3BDF8C4CCF278F944E8C6CBF /* Pods-Example-tvOS-Example-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOS-Example-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-Example-tvOS-Example-tvOSTests/Pods-Example-tvOS-Example-tvOSTests.release.xcconfig"; sourceTree = "<group>"; };
3CC675512A55861100A1B4E3 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
3CF937D8292AEBBD00B543A9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4F21F13455730034D850CD1C /* libPods-Example-ExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-ExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = Example/LaunchScreen.storyboard; sourceTree = "<group>"; };
Expand Down Expand Up @@ -154,6 +156,7 @@
isa = PBXGroup;
children = (
3CF937D8292AEBBD00B543A9 /* Info.plist */,
3CC675512A55861100A1B4E3 /* LaunchScreen.storyboard */,
);
path = "Example-tvOS";
sourceTree = "<group>";
Expand Down Expand Up @@ -363,6 +366,7 @@
buildActionMask = 2147483647;
files = (
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
3CC675522A55861100A1B4E3 /* LaunchScreen.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
15 changes: 6 additions & 9 deletions ios/Example/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -16,17 +16,14 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Logo" translatesAutoresizingMaskIntoConstraints="NO" id="tnD-FC-pGP">
<rect key="frame" x="123.5" y="200" width="128" height="110"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Logo" translatesAutoresizingMaskIntoConstraints="NO" id="yai-VQ-mSR">
<rect key="frame" x="123" y="277" width="128" height="113"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
<color key="backgroundColor" red="0.074569292369999998" green="0.082317329940000003" blue="0.10196382549999999" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="tnD-FC-pGP" firstAttribute="top" secondItem="Bcu-3y-fUS" secondAttribute="top" constant="200" id="tbY-IW-0Nv"/>
<constraint firstItem="tnD-FC-pGP" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="wXU-oK-nQe"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand All @@ -35,6 +32,6 @@
</scene>
</scenes>
<resources>
<image name="Logo" width="128" height="110"/>
<image name="Logo" width="200" height="176"/>
</resources>
</document>
8 changes: 4 additions & 4 deletions src/screens/Splash/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const SplashScreen = () => (
translucent
backgroundColor="transparent"
/>
<View style={styles.container}>
<SafeAreaView style={styles.content}>
<SafeAreaView style={styles.container}>
<View style={styles.content}>
<FastImage
source={require('resources/images/logo.png')}
style={styles.logo}
Expand All @@ -23,8 +23,8 @@ const SplashScreen = () => (
color={styles.loader.color}
size="large"
/>
</SafeAreaView>
</View>
</View>
</SafeAreaView>
</>
);

Expand Down
16 changes: 7 additions & 9 deletions src/screens/Splash/styles.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
import { StyleSheet } from 'react-native';
import { size } from 'styles';

export default StyleSheet.create({
container: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
zIndex: 99,
flex: 1,
height: '100%',
width: '100%',
backgroundColor: '#13151A',
paddingTop: 200,
alignItems: 'center',
justifyContent: 'center',
},
content: {
alignItems: 'center',
justifyContent: 'center',
},
logo: {
width: 128,
width: size(128),
aspectRatio: 533 / 463,
},
loader: {
position: 'absolute',
bottom: -150,
bottom: -size(96),
color: 'rgba(255, 255, 255, 0.7)',
},
});

0 comments on commit d2e7d3d

Please sign in to comment.