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
5594 Sexy-Movies 21-Feb-2023 11:37:26 AM
5593 Test 1 feb21 20-Feb-2023 05:16:11 PM
5592 . 17-Feb-2023 12:28:00 PM
5591 Test1 Feb17 16-Feb-2023 09:48:33 PM
5590 Nusfi Recipe 16-Feb-2023 05:26:40 PM
5589 . 16-Feb-2023 05:22:59 PM
5588 MET 15-Feb-2023 10:39:58 AM
5587 Test12Feb15 14-Feb-2023 10:35:57 PM
5586 Test11Feb15 14-Feb-2023 10:30:34 PM
5585 Test 8Feb15 14-Feb-2023 10:27:35 PM
5584 Test 3 Feb15 14-Feb-2023 10:24:31 PM
5583 Test 2 Feb15 14-Feb-2023 03:28:53 PM
5582 Test 1 Feb15 14-Feb-2023 03:26:12 PM
5581 asddf 14-Feb-2023 03:25:47 PM
5580 asdf 14-Feb-2023 03:25:40 PM
5579 asdf 14-Feb-2023 03:25:33 PM
5578 asf 14-Feb-2023 03:25:27 PM
5577 asdf 14-Feb-2023 03:25:19 PM
5576 asdf 14-Feb-2023 03:25:13 PM
5575 asdf 14-Feb-2023 03:25:05 PM
5574 asdf 14-Feb-2023 03:24:56 PM
5573 asdf 14-Feb-2023 03:24:50 PM
5572 asdf 14-Feb-2023 03:24:41 PM
5571 asdf 14-Feb-2023 03:24:33 PM
5570 asdf 14-Feb-2023 03:24:23 PM
5569 asdf 14-Feb-2023 03:24:16 PM
5568 asdf 14-Feb-2023 03:24:09 PM
5567 asdf 14-Feb-2023 03:24:01 PM

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


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