0% found this document useful (0 votes)
19 views6 pages

React Native

The document contains a React Native application that utilizes components like SafeAreaView, ScrollView, and Text to create a user interface. It includes sections for displaying information, handling dark mode, and provides examples of using buttons and images. Additionally, it demonstrates the use of the Dimensions module for responsive design on different screen sizes.

Uploaded by

Momina Arif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

React Native

The document contains a React Native application that utilizes components like SafeAreaView, ScrollView, and Text to create a user interface. It includes sections for displaying information, handling dark mode, and provides examples of using buttons and images. Additionally, it demonstrates the use of the Dimensions module for responsive design on different screen sizes.

Uploaded by

Momina Arif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

// const Section = ({children, title}): Node => {

// const isDarkMode = useColorScheme() === 'dark';


// return (
// <SafeAreaView style={styles.sectionContainer}>
// <Text
// style={[
// styles.sectionTitle,
// {
// color: isDarkMode ? Colors.white : Colors.black,
// },
// ]}>
// {title}
// </Text>
// <Text
// style={[
// styles.sectionDescription,
// {
// color: isDarkMode ? Colors.light : Colors.dark,
// },
// ]}>
// {children}
// Hello Momina!
// </Text>
// </SafeAreaView>
// );
// };

// const App: () => Node = () => {


// const isDarkMode = useColorScheme() === 'dark';

// const backgroundStyle = {
// backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
// };

// return (
// <SafeAreaView style={backgroundStyle}>
// <StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-
content'} />
// <ScrollView
// contentInsetAdjustmentBehavior="automatic"
// style={backgroundStyle}>
// <Header />
// <SafeAreaView
// style={{
// backgroundColor: isDarkMode ? Colors.black : Colors.white,
// }}>
// <Section title="Let">
// Edit <Text style={styles.highlight}>App.js</Text> to chang
e this
// screen and then come back to see your edits.
// </Section>
// <Section title="See Your Changes">
// <ReloadInstructions />
// </Section>
// <Section title="Debug">
// <DebugInstructions />
// </Section>
// <Section title="Learn More">
// Read the docs to discover what to do next:
// </Section>
// <LearnMoreLinks />
// </SafeAreaView>
// </ScrollView>
// </SafeAreaView>
// );
// };

// const styles = StyleSheet.create({


// sectionContainer: {
// marginTop: 32,
// paddingHorizontal: 24,
// },
// sectionTitle: {
// fontSize: 24,
// fontWeight: '600',
// },
// sectionDescription: {
// marginTop: 8,
// fontSize: 18,
// fontWeight: '400',
// },
// highlight: {
// fontWeight: '700',
// },
// });

// export default App;

// const HelloApp = () => {


// console.log(Dimensions.get('screen'));
// return (
// <SafeAreaView style={styles.container}>
// <ScrollView>
// <View
// style={{
// width: '100%',
// height: '30%',
// backgroundColor: 'dodgerblue',
// }}>
// <Text>
// If you are targeting foldable devices or devices which can
change
// the screen size or app window size, you can use the event
listener
// available in the Dimensions module as shown in the below e
xample.
// </Text>
// </View>

{/* <Text
style={{
fontSize: 24,
}}>
Hello World!
</Text> */}
{/* <Image
style={styles.imgContainer}
source={require('./images/FHT.png')}
/>
<Image
style={styles.imgContainer1}
source={require('./images/aaa.jpg')}
/> */}
{/* <TouchableHighlight onPress= { () => console.log("Image Tappe
d!")}> */}
{/* <Image
// style={styles.imgContainer2}
source={{
width2: 100,
height: 400,
uri:"https://picsum.photos/200/300"}}
/> */}
{/* <View
style={{
width: '100%',
height: '100%',
backgroundColor: 'blue',
}}>
<Text>
HelloA basic button component that should render nicely on an
y
platform. Supports a minimal level of customization.
</Text>
</View> */}
{/* </TouchableHighlight> */}
{/* <Button
style={{textAlign: 'center', marginVertical: 8}}
title="Click me"
disabled
onPress={() => alert('Button Tapped!')}
/> */}
{/* <View> */}
{/* <Text style={styles.title}>
All interaction for the component are disabled.
</Text> */}
{/* <Text
style={{
width: 250,
backgroundColor: 'white',
}}></Text> */}
{/* <Button
title="Press me"
disabled
onPress={() => Alert.alert('Cannot press this one')}
/>
</View> */}
{/* <Separator /> */}
{/* <Button
title="Click me"
onPress={() =>
Alert.alert('My Title', 'My Message', [
{text: 'Yes', onPress: () => console.log('Yes')},
{text: 'No', onPress: () => console.log('No')},
{text: 'Later', onPress: () => console.log('Later')},
])
}
/> */}

{/* <Button
style={{
backgroundColor: 'white',
innerWidth: 150,
flex: 5,
}}
title="Click me"
onPress={() =>
Alert.alert(
'My title',
'My Message',
[
{
text: 'Cancel',
onPress: () => console.log('Cancel Pressed'),
style: 'cancel',
},
{text: 'OK', onPress: () => console.log('OK Pressed')},
],
{cancelable: false},
)
}
/> */}
// </ScrollView>
// </SafeAreaView>
// );
// };

// const styles = StyleSheet.create({


// container: {
// flex: 1,
// backgroundColor: '#fff',
// fontSize: 45,
// justifyContent: 'center',
// alignItems: 'center',
// paddingTop: Platform.OS === 'android' ? StatusBar.currentHeight :
0,
// },

// title: {
// textAlign: 'center',
// marginVertical: 8,
// },

// imgContainer: {
// height: 500,
// width: 450,
// },

// imgContainer1: {
// height: 220,
// width: 450,
// },

// imgContainer2: {
// height: 100,
// width: 200,
// },
// });

// class HelloApp extends React.Component {


// state = {
// mystate:'Lorem ipsum dolor sit amet, consectetur adipisicing elit,
used '
// }
// render () {
// return(
// <SafeAreaView>
// <Text>
// {this.state.mystate}
// </Text>
// </SafeAreaView>
// );
// }
// }
// export default HelloApp;

You might also like