Skip to content

Commit e22a97c

Browse files
committed
updated binaries.
1 parent 6dcdef6 commit e22a97c

33 files changed

+47
-26
lines changed

dist/package/Assets/Plugins/Android.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
103 Bytes
Binary file not shown.

dist/package/Assets/Plugins/Android/WebViewPlugin.jar.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package/Assets/Plugins/Editor.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package/Assets/Plugins/Editor/UnityWebViewPostprocessBuild.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public class UnityWebViewPostprocessBuild
2323
public void OnPostGenerateGradleAndroidProject(string basePath) {
2424
var changed = false;
2525
var androidManifest = new AndroidManifest(GetManifestPath(basePath));
26+
changed = (androidManifest.SetApplicationTheme("@style/UnityThemeSelector") || changed);
27+
changed = (androidManifest.SetActivityTheme("@style/UnityThemeSelector.Translucent") || changed);
2628
changed = (androidManifest.SetHardwareAccelerated(true) || changed);
2729
#if UNITYWEBVIEW_ANDROID_USES_CLEARTEXT_TRAFFIC
2830
changed = (androidManifest.SetUsesCleartextTraffic(true) || changed);
@@ -166,6 +168,25 @@ internal bool SetUsesCleartextTraffic(bool enabled) {
166168
return changed;
167169
}
168170

171+
internal bool SetApplicationTheme(string theme) {
172+
bool changed = false;
173+
if (ApplicationElement.GetAttribute("theme", AndroidXmlNamespace) != theme) {
174+
ApplicationElement.SetAttribute("theme", AndroidXmlNamespace, theme);
175+
changed = true;
176+
}
177+
return changed;
178+
}
179+
180+
internal bool SetActivityTheme(string theme) {
181+
bool changed = false;
182+
var activity = GetActivityWithLaunchIntent() as XmlElement;
183+
if (activity.GetAttribute("theme", AndroidXmlNamespace) != theme) {
184+
activity.SetAttribute("theme", AndroidXmlNamespace, theme);
185+
changed = true;
186+
}
187+
return changed;
188+
}
189+
169190
internal bool SetHardwareAccelerated(bool enabled) {
170191
bool changed = false;
171192
var activity = GetActivityWithLaunchIntent() as XmlElement;

dist/package/Assets/Plugins/Editor/UnityWebViewPostprocessBuild.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package/Assets/Plugins/WebView.bundle/Contents.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package/Assets/Plugins/WebView.bundle/Contents/Info.plist.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

0 commit comments

Comments
 (0)