We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
重写 Activity 的 onCreateView(View parent, String name, Context context, AttributeSet attrs) 方法,在调用 super 之前调用一遍 AutoSize.autoConvertDensityOfGlobal(Activity)
Originally posted by @JessYanCoding in #5 (comment)
————————————————————————————————————————————
Webview在第三方的Activity里,继承的WebViewActivity设置的density失效了,重写了onCreateView方法重新设了一遍也无效。有好的办法吗?
The text was updated successfully, but these errors were encountered:
#1 (comment)
Sorry, something went wrong.
在启动WebviewActivity的时候按照如下方式替换了Context,但还是无效,发现重写的getResources方法没调用。
// 启动WebviewActivity ARouter.getInstance() .build(WebRoutes.WEB_WEBVIEACTIVITY) .withString("url", url) .navigation(adjustAutoSize(context)); private static Context adjustAutoSize(Context context) { return new ContextWrapper(context) { private Resources mResources; { Resources oldResources = super.getResources(); mResources = new Resources(oldResources.getAssets(), oldResources.getDisplayMetrics(), oldResources.getConfiguration()); } @Override public Resources getResources() { AutoSizeCompat.autoConvertDensityBaseOnWidth(mResources, ALERT_BASE_WIDTH); return mResources; } }; }
#13
No branches or pull requests
重写 Activity 的 onCreateView(View parent, String name, Context context, AttributeSet attrs) 方法,在调用 super 之前调用一遍 AutoSize.autoConvertDensityOfGlobal(Activity)
Originally posted by @JessYanCoding in #5 (comment)
————————————————————————————————————————————
Webview在第三方的Activity里,继承的WebViewActivity设置的density失效了,重写了onCreateView方法重新设了一遍也无效。有好的办法吗?
The text was updated successfully, but these errors were encountered: