JessYanCoding / AndroidAutoSize

🔥 A low-cost Android screen adaptation solution (今日头条屏幕适配方案终极版,一个极低成本的 Android 屏幕适配方案).
Apache License 2.0
13.47k stars 1.96k forks source link

screenWidthDp、screenHeightDp设置和还原没有考虑横竖屏切换情况吗? #463

Open start141 opened 1 month ago

start141 commented 1 month ago

Environment

Bug Description:

screenWidthDp和screenHeightDp的大小是会随着横竖屏切换时来回变化的,而阅读AndroidAutoSize源码发现: 1、autoConvertDensity好像没有在横竖屏切换onConfigurationChanged时更新screenWidthDp和screenHeightDp。 2、cancelAdapt时好像也没有根据横竖屏设置不同的screenWidthDp和screenHeightDp值。(使用的是固定的InitScreenWidthDp、InitScreenHeightDp)