mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Expose offset parameters for ToastAndroid
Reviewed By: brosenfeld Differential Revision: D5560628 fbshipit-source-id: b1457493e8429958fbd7bc9c490cffaa33b4a95a
This commit is contained in:
committed by
Facebook Github Bot
parent
f3feca91fc
commit
546a43bda0
@@ -82,6 +82,34 @@ class ToastExample extends React.Component {
|
||||
<Text style={styles.text}>Click me.</Text>
|
||||
</TouchableWithoutFeedback>
|
||||
</RNTesterBlock>
|
||||
<RNTesterBlock title="Toast with x offset">
|
||||
<TouchableWithoutFeedback
|
||||
onPress={() =>
|
||||
ToastAndroid.showWithGravityAndOffset(
|
||||
'This is a toast with x offset',
|
||||
ToastAndroid.SHORT,
|
||||
ToastAndroid.CENTER,
|
||||
50,
|
||||
0,
|
||||
)
|
||||
}>
|
||||
<Text style={styles.text}>Click me.</Text>
|
||||
</TouchableWithoutFeedback>
|
||||
</RNTesterBlock>
|
||||
<RNTesterBlock title="Toast with y offset">
|
||||
<TouchableWithoutFeedback
|
||||
onPress={() =>
|
||||
ToastAndroid.showWithGravityAndOffset(
|
||||
'This is a toast with y offset',
|
||||
ToastAndroid.SHORT,
|
||||
ToastAndroid.BOTTOM,
|
||||
0,
|
||||
50,
|
||||
)
|
||||
}>
|
||||
<Text style={styles.text}>Click me.</Text>
|
||||
</TouchableWithoutFeedback>
|
||||
</RNTesterBlock>
|
||||
</RNTesterPage>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user