Last active
April 20, 2020 05:22
-
-
Save Balaagha/a0672ef6a63442f340d2a032d5d0ea5b to your computer and use it in GitHub Desktop.
React Native general
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmp adminstration -> install -g react-native-cli -> react native coment line tools "for create new project and testing project in android studio" | |
react-native init cars -> (react-native referans to react-native tools,init to show that we create new project , cars project name) | |
Imgage ucun apiden cekilerken => <Image style={{height:300,flex:1,width:0}} source={{uri:brand.model[0].image}} /> / styles butun kaplayici divi tutmaq ucundur | |
iconlar ucun -> https://feathericons.com/ https://www.flaticon.com/ https://icons8.com/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keyboardType={"numeric"} -> TextInput a verilir | |
Dimensions -? ekran olculerini saxlayir -> console.log(Dimensions.get("window")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*teze telefonlardaki çentiye goredir*/SafeAreaView | |
Styling-Method 1 => | |
declere => const styles = { textStyling:{fontSize:22,},} | |
usage => <Text style={styles.textStyling}>Cars</Text> | |
with pakkage => https://styled-system.com/api#flexbox and https://styled-components.com/docs | |
//Image usage | |
api den image url => <Image style={{height:300,flex:1,width:0}} source={{uri:brand.model[0].image}} /> | |
//apiler | |
url phoned de brozerde acma 'Linking.openURL()' => <Button buttonPress={()=>{Linking.openURL(brand.model[0].url);}}/> | |
//button | |
<Button title="ADD" color="red" onPress={addClickHandler} /> -> title icindeki yazini , color bacfround rengini gosterir | |
//TextInput onChangeText => valuesiz isleyir ,asagida ki kimi stateni guncelleyis | |
<TextInput value={newGoalText} onChangeText={text =>setNewGoalText(text)} style={styles.input} placeholder="Write goal text"/> | |
keyboardType={"numeric"} =>keybordun typini mueyyenlesdirir | |
//FlatList-> burda item goals datamizin icindeki ayri ayri elementlerdir(avtomatik bu ad verilik),(ayri ayri datala iki hisseye bolnub,tex ve uid) | |
<FlatList data={goals} renderItem={({item})=>( <View style={styles.goal}> <Text>{item.text}</Text> </View> )} keyExtractor={({uid})=>uid}/> | |
/* meselen nese yazilandan sora keyboardi baglamaq ucundur */ Keyboard.dismiss(); | |
//TouchableOpacity | |
<TouchableOpacity activeOpacity={0.6} onLongPress={()=>deleteGoal(item.uid)} > </TouchableOpacity> -> activeOpacity={0.1}-> active olandaki opasitisi verilir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment