Closed trycatchx closed 1 year ago
目前我通过引入 源码修改了:
ToastImpl 中的 mShowRunnable :
params.width
= WindowManager.LayoutParams.MATCH_PARENT;
目前暂时解决了这个问题。但是可能对通用性是否有一定的影响
小伙子,目前 Toast 的 WindowManager 的宽度只能是自适应的,不能被占满,你可以考虑使用悬浮窗框架来处理这个场景,目前 XToast 支持设置窗口宽度和高度
问题描述 框架版本【必填】:12.2
复现步骤【必填】:在android12的小米手机上。显示较短的 toast
是否必现【必填】:是
出现问题的手机信息【必填】:android12 的全部手机
出现问题的安卓版本【必填】: Android 12,api 31
问题信息的来源渠道【必填】:自己在android12的小米手机上集成Toaster看到的
请回答 是部分机型还是所有机型都会出现【必答】:全部
框架最新的版本是否存在这个问题【必答】:是
是否已经查阅框架文档但还未能解决的【必答】:是
issue 是否有人曾提过类似的问题【必答】:否
是否可以通过 Demo 来复现该问题【必答】:是
使用原生的 Toast 是否也会出现该问题【必答】:否
代码: