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 尺寸过于小 #55

Closed
liuyouth opened this issue Sep 25, 2018 · 7 comments
Closed

Toast 尺寸过于小 #55

liuyouth opened this issue Sep 25, 2018 · 7 comments

Comments

@liuyouth
Copy link

liuyouth commented Sep 25, 2018

像这个系统的自带组件是否在框架内解决更为友好一些。

@JessYanCoding
Copy link
Owner

JessYanCoding commented Sep 25, 2018

自定义 toast,或者在 Toast show 之前 使用 AutoSize#autoConvertDensity 修改下设计图尺寸,直到 Toast 显示正常

@JessYanCoding
Copy link
Owner

想完全规避类似问题,屏蔽掉对系统控件或者对三方库的影响请使用 副单位

@DevXue
Copy link

DevXue commented Oct 26, 2018

@JessYanCoding 老哥, 我现在就是用的副单位进行适配的, 然而今天出现了个问题就是,我引入的第三发库中有Toast弹框,这个Toast弹出来字体特别特别小,我项目中自己写的Toast没有问题(没有自定义过) 我确定我关闭了对dp的支持,用的mm副单位, 这个问题是怎么引起的呢? 第三方库中的Toast弹框没有自定义,就是系统提供的方法··

@DevXue
Copy link

DevXue commented Oct 27, 2018

@JessYanCoding 我直接拿Demo开刀, 在subunits的Demo中写了Toast弹框, 运行之后 弹出来特别小。

@JessYanCoding
Copy link
Owner

JessYanCoding commented Oct 29, 2018

@DevXue AutoSizeConfig.getInstance().getUnitsManager().setSupportSP(false) 需要关闭对 sp 的支持,sp 才影响字体大小,dp 只影响 View 的大小

@DevXue
Copy link

DevXue commented Oct 29, 2018

@JessYanCoding 感谢作者大大!

@fmliqi
Copy link

fmliqi commented Nov 13, 2018

@DevXue,我也研究了一下准备在项目中使用。你弹系统对哈u框出来是先手动调整设计图尺寸&关闭sp支持,然后show完了之后两个都恢复之前的设计尺寸吗(因为项目比较大了怕接入引入的问题,想多了解点)

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

No branches or pull requests

4 participants