-
Notifications
You must be signed in to change notification settings - Fork 2k
双屏异显适配问题 #188
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
哥们这个问题有解决吗,我也遇到了 |
副屏就按照主屏的方式来就可以了 |
在Presentation中复写getResources,调用 AutoSizeCompat.autoConvertDensity,或导致Presentation被关闭,楼主怎么解决适配的 |
@KeqingLI Presentation 没研究过,报错意思是让你不要改变 DisplayMetrics 的某些信息,意味着 Presentation 在运行时可能不允许改变 DisplayMetrics 某些信息的行为,要求运行时的 DisplayMetrics 必须和创建时保持一致。 |
对于副屏的界面 直接每个界面单独调用一个适配方法 改变这个界面的屏幕宽度 为副屏的宽度 设计稿固定的宽度 设置一下density 就是每个副屏的Fragment都需要调用这个方法:`fun screenFix(screenWidth:Int,context:Context?){
|
Environment
Bug Description:
项目要开发一个收银屏,一块主板显示两个屏幕,分别显示不同的内容。主屏的分辨率和副屏分辨率是一样的,屏幕尺寸也是一样的,但是输出的density是不同的。主屏的density为160,副屏的density为227。目前主屏的适配是没问题,是按照1920*1080的设计图来做的,直接px/3后来直接设置dp,但是副屏的话就不能按照主屏的来设置dp了。我想请教下要如何转换,才能在副屏直接设置dp吗?
Screenshot

主屏信息截图:
副屏信息截图:

The text was updated successfully, but these errors were encountered: