मुझे विश्वास है कि xinthink द्वारा यह लाइब्रेरी आपके द्वारा प्राप्त की जाएगी।
मैं इसे एंड्रॉइड और आईओएस दोनों पर उपयोग कर रहा हूं।
ईमानदार होने के बावजूद, उन सभी पुस्तकालयों ने आपको कुछ शैलियों को दिया है, ताकि आप स्वयं भी लिख सकें। निम्नलिखित शैलियों का उपयोग
<ScrollView style={styles.scrollView}>
<View style={styles.cardContainer}>
<View style={styles.card}>
<View resizeMode="cover" style={styles.cardTitleContainer}>
<Text style={styles.cardTitle}>Commented on</Text>
</View>
<View // TextView padding not handled well on Android https://github.com/facebook/react-native/issues/3233
style={{
padding : 15,
}}
>
<Text style={styles.cardContent}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Mauris sagittis pellentesque lacus eleifend lacinia...
</Text>
</View>
<View style={styles.cardAction}>
<Text>My Action</Text>
</View>
</View>
</View>
</ScrollView>
:
उदाहरण के लिए यदि आप ऐसा तरह एक सामग्री डिजाइन कार्ड बना सकते हैं
cardContainer:{
flex: 1,
alignItems: 'stretch',
backgroundColor: '#F5FCFF',
padding: 20,
marginTop: self.props.device.platform === 'android' ? 56 : 0,
},
card:{
flex: 1,
backgroundColor: '#ffffff',
borderRadius: 2,
borderColor: '#ffffff',
borderWidth: 1,
shadowColor: 'rgba(0, 0, 0, 0.12)',
shadowOpacity: 0.8,
shadowRadius: 2,
shadowOffset: {
height: 1,
width: 2,
},
},
cardTitleContainer:{
flex: 1,
height: 170,
},
cardTitle:{
position: 'absolute',
top: 120,
left: 26,
backgroundColor: 'transparent',
padding: 16,
fontSize: 24,
color: '#000000',
fontWeight: 'bold',
},
cardContent:{
padding:0,
color: 'rgba(0, 0, 0, 0.54)',
},
cardAction:{
borderStyle: 'solid',
borderTopColor: 'rgba(0, 0, 0, 0.1)',
borderTopWidth: 1,
padding: 15,
},
मैं पुस्तकालय मैं अपने लिंक में साझा से इस उदाहरण कोड मिला है। आप यह भी देखेंगे कि इस पुस्तकालय में कोई कस्टम घटक नहीं हैं, सिर्फ शैलियों।
धन्यवाद क्रिस। मेरा मानना है कि वर्तमान में केवल एंड्रॉइड ही है और लेखक का कहना है कि उनके पास आईओएस की कोई योजना नहीं है। –
ओह, क्षमा करें ... मैंने उस महत्वपूर्ण जानकारी की उपेक्षा की। –
प्रतिक्रिया-मूल-सामग्री-डिजाइन एमआरएन के शीर्ष पर आधारित है। यह आईओएस पर काम करता है, लेकिन हालांकि कुछ बदलावों की आवश्यकता है। – Alias