Copy and Paste  -   An Application to Copy/Paste Text  

 
S.No 5704 Name ghhascshgcvs Date/Time 22-May-2023 05:00:15 PM

Copy text from below
import React,{useState} from 'react';
import { Button, View,ScrollView ,Text,TouchableOpacity,StyleSheet} from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import {TextInput} from 'react-native-paper';



function Input({navigation}) {
 
const [name, setName] = useState("");
const [pass, setPass] = useState("");


return (
<ScrollView contentContainerStyle = {styles.container}>
    <View style = {{flexDirection:'row',paddingTop:5}}>
    <Text style={{fontWeight:"bold",fontSize:20,paddingTop:18,paddingRight:12}}>Username   </Text>
    <TextInput
      label="Username"
      mode="outlined"
      style={{margin: 10,width:180,height:35}}
      default={name}
      onChangeText = {text => setName(text)}
      />
    </View>
    <View style = {{flexDirection:'row'}}>
    <Text style={{fontWeight:"bold",fontSize:20,paddingTop:35,paddingRight:10}}>Password  </Text>
    <TextInput
      label="Password"
      mode="outlined"
      secureTextEntry={true}
      style={{marginBottom: 24,width:180,height:35,marginLeft:12,marginTop:25}}
      default={pass}
      onChangeText = {text => setPass(text)}
      />
    </View>


   
   
    <TouchableOpacity style={styles.button}

onPress={()=>{navigation.navigate("Display",
{name:name,pass:pass}
)

}
}
>
<Text style={styles.btnText}>Submit</Text>
</TouchableOpacity>



</ScrollView>
);
}



function MyDisplay({navigation,route}) {
  return (
    <View style={{ flex: 1, marginLeft:20,marginTop:40 }}>
 <Text style={styles.displaytext}>Username :  {route.params.name}</Text>
 <Text style={styles.displaytext}>Password :  {route.params.pass}</Text>

</View>

  )}


const Stack = createNativeStackNavigator();

function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen name="Data_input" component={Input} options={{ title: 'CuOnline' }} />
        <Stack.Screen name="Display" component={MyDisplay} options={{ title: 'Display Screen' }}/>
      </Stack.Navigator>
    </NavigationContainer>
  );
}
const styles = StyleSheet.create({
  container: {
    justifyContent:'center',
    backgroundColor: '#ecf0f1',
    padding: 8,
    flexDirection:'column',
    marginLeft:16,
    marginTop:75

  },

 
  button:{
    marginTop:25,
    width:120,
    padding: 10,
    borderRadius: 4,
    borderWidth: 1,
    borderColor: '#01516b',
    backgroundColor:"#008CBA",
    marginLeft: 120,
      },
      btnText: {
        color:"white",
        fontWeight: 'bold',
        textAlign: 'center',
      },
      displaytext:{
        fontWeight: 'bold',
        fontSize:20
      }
  });
export default App;




comments powered by Disqus
NEW ENTRIES
S.No Name Entry Time/Date
5873 camera code 21-Dec-2023 10:05:49 AM
5872 code 20-Dec-2023 10:38:07 AM
5871 Updated Kid 20-Dec-2023 07:09:59 AM
5870 Alpha 18-Dec-2023 10:52:22 PM
5869 code 07-Dec-2023 10:41:02 AM
5868 HMZ1 07-Dec-2023 08:50:55 AM
5867 HMZ 07-Dec-2023 08:41:31 AM
5866 Child New 05-Dec-2023 08:45:17 AM
5865 Danielle Simpson 29-Nov-2023 10:52:32 PM
5864 comp 28-Nov-2023 03:37:04 PM
5863 New Kids 27-Nov-2023 07:07:09 AM
5862 Jdh 24-Nov-2023 08:10:16 PM
5861 111 24-Nov-2023 03:02:22 PM
5860 modal 20-Nov-2023 03:02:57 PM
5859 omar 19-Nov-2023 04:27:23 PM
5858 ss 17-Nov-2023 05:14:03 PM
5857 ARCode 17-Nov-2023 02:55:42 PM
5856 Jarvo 17-Nov-2023 08:28:14 AM
5855 K1Ds Vids 17-Nov-2023 06:55:00 AM
5854 best 16-Nov-2023 07:07:10 PM
5853 matchsummary 16-Nov-2023 06:38:13 PM
5852 findindex 16-Nov-2023 06:30:48 PM
5851 loops 16-Nov-2023 05:44:20 PM
5850 sorting 16-Nov-2023 05:36:34 PM
5849 test 16-Nov-2023 05:06:51 PM
5848 New Sexy 16-Nov-2023 07:13:16 AM
5847 455555555 13-Nov-2023 02:52:30 PM
5846 CSG Med 05-Nov-2023 04:08:52 PM
5845 New Kids 04-Nov-2023 06:45:51 AM
5844 BMP 31-Oct-2023 06:41:06 PM

[First] [Prev] 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 [Next] [Last]
 
web counter
web counter


To report any error messages or bugs, or other issues, please send email at: info@pakproject.com