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

shadow插件里PluginDefaultProxyActivity 主题是透明的,导致onStop没有调用 #1347

Open
yqshi opened this issue Aug 26, 2024 · 2 comments

Comments

@yqshi
Copy link

yqshi commented Aug 26, 2024

我们在onStop里有对应的业务处理,但是使用shadow变成插件之后,会导致Activity的onStop没有调用。

看了一下代码发现PluginDefaultProxyActivity 这个主题需要设置成透明到,所以导致onStop没有调用

    <activity
        android:name="com.tencent.shadow.sample.plugin.runtime.PluginDefaultProxyActivity"
        android:launchMode="standard"
        android:screenOrientation="portrait"
        android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize|layoutDirection"
        android:hardwareAccelerated="true"
        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
        android:multiprocess="true" />
@shifujun
Copy link
Collaborator

那确实是宿主中的container activity注意注册成不透明的才行。

因为我们当时只考虑了插件activity有的透明有的不透明,所以壳子注册成透明的,方便插件调整背景颜色。并没有用到onStop,所以忽略了这一点。

@yqshi
Copy link
Author

yqshi commented Aug 26, 2024

你的意思是PluginDefaultProxyActivity 这个的主题去除Translucent,就行了吗?

这样会引起其他问题吗?

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