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
5628 Test 2 Mar 3 02-Mar-2023 09:34:35 PM
5627 Test 1 Mar 3 02-Mar-2023 09:31:07 PM
5626 Test 8 Mar 2 01-Mar-2023 07:58:21 PM
5625 Test 3 Mar 2 01-Mar-2023 07:57:36 PM
5624 Test 2 Mar 2 01-Mar-2023 07:56:55 PM
5623 Test 1 Mar 2 01-Mar-2023 07:56:17 PM
5622 MET March 1 28-Feb-2023 09:28:19 PM
5621 Test 5 Mar1 28-Feb-2023 09:24:26 PM
5620 Test3 Mar 1 28-Feb-2023 09:21:50 PM
5619 Test2 March1 28-Feb-2023 09:16:47 PM
5618 Test 1 Mar1 28-Feb-2023 08:35:23 PM
5617 Test 2 F28 28-Feb-2023 10:33:02 AM
5616 Test 2 Feb28 28-Feb-2023 10:22:59 AM
5615 SEXY HOT 28-Feb-2023 08:45:07 AM
5614 Test 1 Feb28 27-Feb-2023 09:41:28 PM
5613 PHD 24-Feb-2023 10:41:13 AM
5612 Test1 Feb24 23-Feb-2023 10:07:55 PM
5611 PHD 23-Feb-2023 06:39:41 PM
5610 online test 23-Feb-2023 10:37:21 AM
5609 MET 23 FEB 23-Feb-2023 10:04:42 AM
5608 Test 1 Feb23 22-Feb-2023 11:21:15 PM
5607 Test1Feb22 21-Feb-2023 03:12:58 PM
5606 PPSL 21-Feb-2023 03:11:57 PM
5605 PNG 21-Feb-2023 03:11:39 PM
5604 PCB 21-Feb-2023 03:11:28 PM
5603 PAK 21-Feb-2023 03:11:19 PM
5602 PPG 21-Feb-2023 03:11:03 PM
5601 PQR 21-Feb-2023 03:10:54 PM
5600 PPLGC 21-Feb-2023 03:10:44 PM
5599 PPKL 21-Feb-2023 03:10:36 PM

[First] [Prev] 11 | 12 [Next] [Last]
 
web counter
web counter


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