Skip to content
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

急,小米系统miui10.0,应用安装第一次打开应用时界面很大,后面再打开就正常了 #38

Open
isqing opened this issue Oct 8, 2018 · 5 comments

Comments

@isqing
Copy link

isqing commented Oct 8, 2018

第一次安装打开应用时界面很大,后面再打开就正常了,但是我这边情况特殊应用只打开一次一直运行下去,导致我不得不要适配,我用miui9.2测试的正常,请问这是什么问题呢

@isqing isqing changed the title 小米系统miui10.0,应用安装第一次打开应用时界面很大,后面再打开就正常了 急,小米系统miui10.0,应用安装第一次打开应用时界面很大,后面再打开就正常了 Oct 8, 2018
@for7GG
Copy link

for7GG commented Oct 8, 2018

resetDensity方法debug跟一下,看是否正常

@isqing
Copy link
Author

isqing commented Oct 8, 2018

Field field = Resources.class.getDeclaredField("mTmpMetrics");这里catch了,java.lang.NoSuchFieldException: No field mTmpMetrics in class Landroid/content/res/Resources; (declaration of 'android.content.res.Resources' appears in /system/framework/framework.jar)

@isqing
Copy link
Author

isqing commented Oct 8, 2018

new DensityHelper(getApplication(), width).activate();我在activity中用的,因为我的width是根据后台动态获取的,这里有影响吗?华为手机8.0也是第一次这样

@for7GG
Copy link

for7GG commented Oct 9, 2018

width应该是写死的,看你这类名,用的不是最新版?

@isqing
Copy link
Author

isqing commented Oct 9, 2018

DensityHelper.resetDensity(this,designWidth);多加这个解决了,感谢作者

Repository owner deleted a comment from liuzhebaba Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants