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