| 1 | import { Image } from 'expo-image';
|
| 2 | import { Platform, StyleSheet } from 'react-native';
|
| 3 |
|
| 4 | import { Collapsible } from '@/components/ui/collapsible';
|
| 5 | import { ExternalLink } from '@/components/external-link';
|
| 6 | import ParallaxScrollView from '@/components/parallax-scroll-view';
|
| 7 | import { ThemedText } from '@/components/themed-text';
|
| 8 | import { ThemedView } from '@/components/themed-view';
|
| 9 | import { IconSymbol } from '@/components/ui/icon-symbol';
|
| 10 | import { Fonts } from '@/constants/theme';
|
| 11 |
|
| 12 | export default function TabTwoScreen() {
|
| 13 | return (
|
| 14 | <ParallaxScrollView
|
| 15 | headerBackgroundColor={{ light: '#D0D0D0', dark: '#353636' }}
|
| 16 | headerImage={
|
| 17 | <IconSymbol
|
| 18 | size={310}
|
| 19 | color="#808080"
|
| 20 | name="chevron.left.forwardslash.chevron.right"
|
| 21 | style={styles.headerImage}
|
| 22 | />
|
| 23 | }>
|
| 24 | <ThemedView style={styles.titleContainer}>
|
| 25 | <ThemedText
|
| 26 | type="title"
|
| 27 | style={{
|
| 28 | fontFamily: Fonts.rounded,
|
| 29 | }}>
|
| 30 | Explore
|
| 31 | </ThemedText>
|
| 32 | </ThemedView>
|
| 33 | <ThemedText>This app includes example code to help you get started.</ThemedText>
|
| 34 | <Collapsible title="File-based routing">
|
| 35 | <ThemedText>
|
| 36 | This app has two screens:{' '}
|
| 37 | <ThemedText type="defaultSemiBold">app/(tabs)/index.tsx</ThemedText> and{' '}
|
| 38 | <ThemedText type="defaultSemiBold">app/(tabs)/explore.tsx</ThemedText>
|
| 39 | </ThemedText>
|
| 40 | <ThemedText>
|
| 41 | The layout file in <ThemedText type="defaultSemiBold">app/(tabs)/_layout.tsx</ThemedText>{' '}
|
| 42 | sets up the tab navigator.
|
| 43 | </ThemedText>
|
| 44 | <ExternalLink href="https://docs.expo.dev/router/introduction">
|
| 45 | <ThemedText type="link">Learn more</ThemedText>
|
| 46 | </ExternalLink>
|
| 47 | </Collapsible>
|
| 48 | <Collapsible title="Android, iOS, and web support">
|
| 49 | <ThemedText>
|
| 50 | You can open this project on Android, iOS, and the web. To open the web version, press{' '}
|
| 51 | <ThemedText type="defaultSemiBold">w</ThemedText> in the terminal running this project.
|
| 52 | </ThemedText>
|
| 53 | </Collapsible>
|
| 54 | <Collapsible title="Images">
|
| 55 | <ThemedText>
|
| 56 | For static images, you can use the <ThemedText type="defaultSemiBold">@2x</ThemedText> and{' '}
|
| 57 | <ThemedText type="defaultSemiBold">@3x</ThemedText> suffixes to provide files for
|
| 58 | different screen densities
|
| 59 | </ThemedText>
|
| 60 | <Image
|
| 61 | source={require('@/assets/images/react-logo.png')}
|
| 62 | style={{ width: 100, height: 100, alignSelf: 'center' }}
|
| 63 | />
|
| 64 | <ExternalLink href="https://reactnative.dev/docs/images">
|
| 65 | <ThemedText type="link">Learn more</ThemedText>
|
| 66 | </ExternalLink>
|
| 67 | </Collapsible>
|
| 68 | <Collapsible title="Light and dark mode components">
|
| 69 | <ThemedText>
|
| 70 | This template has light and dark mode support. The{' '}
|
| 71 | <ThemedText type="defaultSemiBold">useColorScheme()</ThemedText> hook lets you inspect
|
| 72 | what the user's current color scheme is, and so you can adjust UI colors accordingly.
|
| 73 | </ThemedText>
|
| 74 | <ExternalLink href="https://docs.expo.dev/develop/user-interface/color-themes/">
|
| 75 | <ThemedText type="link">Learn more</ThemedText>
|
| 76 | </ExternalLink>
|
| 77 | </Collapsible>
|
| 78 | <Collapsible title="Animations">
|
| 79 | <ThemedText>
|
| 80 | This template includes an example of an animated component. The{' '}
|
| 81 | <ThemedText type="defaultSemiBold">components/HelloWave.tsx</ThemedText> component uses
|
| 82 | the powerful{' '}
|
| 83 | <ThemedText type="defaultSemiBold" style={{ fontFamily: Fonts.mono }}>
|
| 84 | react-native-reanimated
|
| 85 | </ThemedText>{' '}
|
| 86 | library to create a waving hand animation.
|
| 87 | </ThemedText>
|
| 88 | {Platform.select({
|
| 89 | ios: (
|
| 90 | <ThemedText>
|
| 91 | The <ThemedText type="defaultSemiBold">components/ParallaxScrollView.tsx</ThemedText>{' '}
|
| 92 | component provides a parallax effect for the header image.
|
| 93 | </ThemedText>
|
| 94 | ),
|
| 95 | })}
|
| 96 | </Collapsible>
|
| 97 | </ParallaxScrollView>
|
| 98 | );
|
| 99 | }
|
| 100 |
|
| 101 | const styles = StyleSheet.create({
|
| 102 | headerImage: {
|
| 103 | color: '#808080',
|
| 104 | bottom: -90,
|
| 105 | left: -35,
|
| 106 | position: 'absolute',
|
| 107 | },
|
| 108 | titleContainer: {
|
| 109 | flexDirection: 'row',
|
| 110 | gap: 8,
|
| 111 | },
|
| 112 | });
|