dimens.xml for multi window mod

五迷三道 提交于 2019-12-11 14:47:06

问题


My app supports multi window feature. I want the app to take dimensions from different dimens.xml files when the app is in normal mode and multi window mode.

I have declared the minWidth = 255dp and minHeight = 600dp.

I have declared the dimens-h600dp.xml and dimens.xml files but the app takes the values from only dimens-h600dp.xml in any mode.

How can I make the app to take dimensions from different dimens.xml files when the app is in normal mode and multi window mode ?


回答1:


You are specifically opting out of configuration changes for screen sizes. As a result, nothing will happen automatically to force you to take on new resource values when the app enters or exits split-screen mode.

I recommend removing android:configChanges. Android will then recreate your activities and fragments when a configuration change occurs, and you will pick up the revised resources at that point.



来源:https://stackoverflow.com/questions/58554897/dimens-xml-for-multi-window-mod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!