mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-03 22:43:35 +08:00
Fix StyleSheet 'textAlign' for AndroidTextInput. Closes #2702
Summary: change `setTextAlign` and `setTextAlignVertical` to receive argument of type `String` (the same as in `StyleSheet`), so that native props and stylesheet props are calling the same ReactMethod - add demo (may not be necessary) Closes https://github.com/facebook/react-native/pull/4481 Reviewed By: svcscm Differential Revision: D2823456 Pulled By: mkonicek fb-gh-sync-id: 349d17549f419b5bdc001d70b583423ade06bfe8
This commit is contained in:
committed by
facebook-github-bot-7
parent
dc96935681
commit
f453e14c8f
@@ -348,25 +348,19 @@ exports.examples = [
|
||||
placeholder="multiline, aligned top-left"
|
||||
placeholderTextColor="red"
|
||||
multiline={true}
|
||||
textAlign="start"
|
||||
textAlignVertical="top"
|
||||
style={styles.multiline}
|
||||
style={[styles.multiline, {textAlign: "left", textAlignVertical: "top"}]}
|
||||
/>
|
||||
<TextInput
|
||||
autoCorrect={true}
|
||||
placeholder="multiline, aligned center"
|
||||
placeholderTextColor="green"
|
||||
multiline={true}
|
||||
textAlign="center"
|
||||
textAlignVertical="center"
|
||||
style={[styles.multiline]}
|
||||
style={[styles.multiline, {textAlign: "center", textAlignVertical: "center"}]}
|
||||
/>
|
||||
<TextInput
|
||||
autoCorrect={true}
|
||||
multiline={true}
|
||||
textAlign="end"
|
||||
textAlignVertical="bottom"
|
||||
style={[styles.multiline, {color: 'blue'}]}>
|
||||
style={[styles.multiline, {color: 'blue'}, {textAlign: "right", textAlignVertical: "bottom"}]}>
|
||||
<Text style={styles.multiline}>multiline with children, aligned bottom-right</Text>
|
||||
</TextInput>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user