更新toast偏移位置

This commit is contained in:
lyswhut 2024-10-10 12:59:48 +08:00
parent 3c0a13fb5a
commit 843b56b003

View File

@ -120,7 +120,7 @@ export const toast = (message: string, duration: 'long' | 'short' = 'short', pos
switch (position) { switch (position) {
case 'top': case 'top':
_position = ToastAndroid.TOP _position = ToastAndroid.TOP
offset = 80 offset = 120
break break
case 'center': case 'center':
_position = ToastAndroid.CENTER _position = ToastAndroid.CENTER
@ -129,7 +129,7 @@ export const toast = (message: string, duration: 'long' | 'short' = 'short', pos
case 'bottom': case 'bottom':
default: default:
_position = ToastAndroid.BOTTOM _position = ToastAndroid.BOTTOM
offset = 80 offset = 120
break break
} }
ToastAndroid.showWithGravityAndOffset(message, _duration, _position, 0, offset) ToastAndroid.showWithGravityAndOffset(message, _duration, _position, 0, offset)