Skip to content

Instantly share code, notes, and snippets.

@Solarin-Johnson
Last active November 15, 2024 02:55
Show Gist options
  • Select an option

  • Save Solarin-Johnson/1552d222de1f9b288014446712c61f6d to your computer and use it in GitHub Desktop.

Select an option

Save Solarin-Johnson/1552d222de1f9b288014446712c61f6d to your computer and use it in GitHub Desktop.
ScrollView ishh
import {
Dimensions,
Image,
TextInput,
View,
SafeAreaView,
ScrollView,
} from 'react-native';
// You can import supported modules from npm
import { Card } from 'react-native-paper';
// or any files within the Snack
import AssetExample from './components/AssetExample';
export default function App() {
return (
<SafeAreaView style={{ flex: 1 }}>
<Image
source={{
uri: 'https://images.unsplash.com/photo-1446071103084-c257b5f70672?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8fA%3D%3D',
}}
style={{
position: 'absolute',
width: '100%',
top: 0,
height: Dimensions.get('screen').height,
zIndex: 0,
}}
/>
<ScrollView style={{ padding: 24 }}>
<View style={{ height: 1500, gap: 20, justifyContent: 'center' }}>
<Card>
<AssetExample />
</Card>
<TextInput
style={{
height: 54,
borderColor: '#ffffff',
backgroundColor: 'white',
borderWidth: 1,
marginBottom: 10,
paddingLeft: 8,
}}
placeholder="Type here..."
/>
</View>
</ScrollView>
</SafeAreaView>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment