JessYanCoding / AndroidAutoSize

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

不能适配RemoteView #414

Open hhsj168 opened 2 years ago

hhsj168 commented 2 years ago

Environment

手机宽度1080 系统 392 dp,当设置屏幕宽度360单位的时候

Bug Description:

手机宽度1080 系统 392 dp,当设置屏幕宽度360单位的时候, RemoteView中获的宽度并不是 360单位的,仍然是392dpi的,有没有办法适配RemoteView。比如给RemoteView中ImageView设置66dp,图片的实际大小不是 198 px,而是 182 px。

Log:

Screenshot

Related Code:

Others:

linkaipeng commented 1 year ago

修改获取 remoteView 的 context 的 density、scaledDensity、densityDpi;改回系统原有的值;