Open hhsj168 opened 2 years ago
手机宽度1080 系统 392 dp,当设置屏幕宽度360单位的时候
手机宽度1080 系统 392 dp,当设置屏幕宽度360单位的时候, RemoteView中获的宽度并不是 360单位的,仍然是392dpi的,有没有办法适配RemoteView。比如给RemoteView中ImageView设置66dp,图片的实际大小不是 198 px,而是 182 px。
修改获取 remoteView 的 context 的 density、scaledDensity、densityDpi;改回系统原有的值;
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: