-
Notifications
You must be signed in to change notification settings - Fork 2k
可以设置默认不自适应吗 想适配的时候在继承 CustomAdapt #222
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
Comments
不开启 dp 的适配,仅在需要适配的页面使用副单位,就可以分阶段逐步完成迁移,不会影响之前使用 dp 的旧页面。https://github.com/JessYanCoding/AndroidAutoSize/tree/master/demo-subunits |
https://github.com/JessYanCoding/AndroidAutoSize/blob/master/demo/src/main/java/me/jessyan/autosize/demo/BaseApplication.java#L119 如果只想使用 DP,不想使用副单位,也不想每个 Activity density 的修改是全局的,一处修改,哪怕是系统控件和三方库也会受到影响,只可能默认开启,框架提供的取消操作,也是在需要取消适配的 Activity 绘制页面之前,将 density 还原为默认的,在需要适配的 Activity 绘制之前,再修改回来,如此不停的去切换,所以只能通过上述的方式实现取消操作,推荐第一种方式,更稳定,也不会影响三方库和系统控件 |
@JessYanCoding @cl2980457390 修改默认的AutoAdaptStrategy应该就可以啊。 |
项目比较大 想默认不自适应,想适配时就继承CustomAdapt,通过多个版本迭代来实现适配,
不需要为每给Activity 设置CancelAdapt ,的设置有吗。
The text was updated successfully, but these errors were encountered: