Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion projects/sample/sample-host/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
<activity
android:name="com.tencent.shadow.sample.host.PluginLoadActivity"
android:launchMode="standard"
android:screenOrientation="portrait"
android:theme="@style/troop_Transparent" />

<!--dynamic activity注册
Expand All @@ -115,6 +114,15 @@
android:process=":plugin"
/>

<activity
android:name="com.tencent.shadow.sample.plugin.runtime.PluginDefaultNoTransparentProxyActivity"
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:process=":plugin"
/>

<activity
android:name="com.tencent.shadow.test.dynamic.runtime.container.PluginSingleInstance1ProxyActivity"
android:launchMode="singleInstance"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class SampleComponentManager extends ComponentManager {
* dynamic-runtime-apk 模块中定义的壳子Activity,需要在宿主AndroidManifest.xml注册
*/
private static final String DEFAULT_ACTIVITY = "com.tencent.shadow.sample.plugin.runtime.PluginDefaultProxyActivity";
private static final String DEFAULT_NO_TRANSPARENT_ACTIVITY = "com.tencent.shadow.sample.plugin.runtime.PluginDefaultNoTransparentProxyActivity";
private static final String SINGLE_INSTANCE_ACTIVITY = "com.tencent.shadow.sample.plugin.runtime.PluginSingleInstance1ProxyActivity";
private static final String SINGLE_TASK_ACTIVITY = "com.tencent.shadow.sample.plugin.runtime.PluginSingleTask1ProxyActivity";

Expand All @@ -56,6 +57,8 @@ public ComponentName onBindContainerActivity(ComponentName pluginActivity) {
/**
* 这里配置对应的对应关系
*/
case "com.tencent.shadow.sample.plugin.app.lib.usecases.activity.TestActivityOrientation":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样可能会暗示需要屏幕旋转的Activity不能有透明色。

return new ComponentName(context, DEFAULT_NO_TRANSPARENT_ACTIVITY);
}
return new ComponentName(context, DEFAULT_ACTIVITY);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Tencent is pleased to support the open source community by making Tencent Shadow available.
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the BSD 3-Clause License (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of
* the License at
*
* https://opensource.org/licenses/BSD-3-Clause
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package com.tencent.shadow.sample.plugin.runtime;


import android.annotation.SuppressLint;

import com.tencent.shadow.core.runtime.container.PluginContainerActivity;

@SuppressLint("Registered")//无需注册在这个模块的Manifest中,要注册在宿主的Manifest中。
public class PluginDefaultNoTransparentProxyActivity extends PluginContainerActivity {
}