-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
插件manager中的view如果有ProgressBar,但是宿主不显示ProgressBar #1271
Labels
bug
Something isn't working
Comments
这一般就是View的Context的问题。 Line 115 in d9deb2f
这里的inflater的context可能是宿主的。所以有些资源可能找不到。调试调试看看它在请求context的哪些接口,搞一个wrapper接下来请求,从插件里取资源给它一般就可以了。 |
大佬,我从github拉下来Shadow代码后,就修改了 activity_load_plugin.xml,然后加了个ProgressBar,就显示不了了。你说的"搞一个wrapper接下来请求,从插件里取资源给它一般就可以了。" 我有点不懂该改哪里,可以再详细说说吗? |
shifujun
added a commit
to shifujun/Shadow
that referenced
this issue
Dec 19, 2023
模仿ContextThemeWrapper的做法。 否则Android内置的View,如ProgressBar在从Theme.obtainStyledAttributes 时会获取不到自己的资源。 fix Tencent#1271
这是个Bug。activity_load_plugin.xml原本就有个ProgressBar没显示出来。 |
已确认修复,感谢! |
shifujun
added a commit
that referenced
this issue
Dec 20, 2023
模仿ContextThemeWrapper的做法。 否则Android内置的View,如ProgressBar在从Theme.obtainStyledAttributes 时会获取不到自己的资源。 fix #1271
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1、Shadow里Manager就会首先从manger.apk中动态加载一个View供宿主显示Loading状态。修改activity_load_plugin.xml
`
2、ProgressBar 不会显示,页面只显示"正在加载中..."
请问是咋回事
The text was updated successfully, but these errors were encountered: