Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上移Toast位置避免遮挡播放模式图标 #603

Merged
merged 3 commits into from
Oct 9, 2024
Merged

Conversation

sibojia
Copy link

@sibojia sibojia commented Oct 9, 2024

目前默认Toast位置在底边,在播放界面点击播放模式的时候,toast正好把播放模式图标遮挡住。因为大多数场景下,用户希望连续点击图标,切换到自己想要的模式,但是toast更新要1秒钟,导致很难知道现在实际的播放模式是啥,而是要等到多条toast都消失才能看到。所以希望挪一下位置,这样直接看图标就知道当前的模式。

@lyswhut
Copy link
Owner

lyswhut commented Oct 9, 2024

感谢提供 PR,
showWithGravity在大部分设备上的位置是正常的,但在某些设备上出现在最底部,
改用 showWithGravityAndOffset 后,有没有试过 topcenter 时的位置呢?

@lyswhut lyswhut merged commit 1627642 into lyswhut:dev Oct 9, 2024
1 check passed
@sibojia
Copy link
Author

sibojia commented Oct 10, 2024

@lyswhut 感谢处理PR,之前应用中不记得有其他位置的toast,所以没有改动和测试。另外我试了一下现在的80像素,在我这里还是挡住的,比较尴尬,所以要不还是改大点?
我的设备是 huawei mate xs2,系统鸿蒙4.2.0,屏幕分辨率 2200x2480
20241010-115809

@lyswhut
Copy link
Owner

lyswhut commented Oct 10, 2024

改成100呢?你看看最小多少合适

@sibojia
Copy link
Author

sibojia commented Oct 10, 2024

我这里改到120刚好不挡。另外我这边android studio的默认模拟器上,也是需要这个偏移的,不知道是不是我们的测试环境不太一致。以下两图是120在真机和模拟器上的效果
image
20241010-123037

@lyswhut
Copy link
Owner

lyswhut commented Oct 10, 2024

那就用120,我回头改下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants