【发布时间】:2019-06-02 05:10:17
【问题描述】:
我在使用Xamarin Forms 3.3 版时遇到问题。
在Android上,当切换模块(示例模块Home)时,Splash Screen总是显示(我在Android上的每个屏幕之间遇到这个问题)。 (在 iOS 上完美运行)
在Xamarin Forms 2.5版本上,没有这个问题。
在 Xamarin Forms 3.3 上切换模块时如何防止显示 Splash Screen。
我试过了,但它不起作用。 ANDROID: SPLASH: Why I always see splash screen when app is resumed
这是我的代码:
<style name="MyProject" parent="MyProject.Base">
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowFullscreen">true</item>
<item name="android:buttonStyle">@style/noPaddingButtonStyle</item>
<item name="android:editTextStyle">@style/noPaddingEditTextStyle</item>
</style>
并在MainActivity.cs使用它:
[Activity(Label = "MyProject",
Theme = "@style/MyProject",
Icon = "@drawable/ic_launcher",
LaunchMode = LaunchMode.SingleInstance,
Name = "com.myproject.mobile.MainActivity",
MainLauncher = true,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
WindowSoftInputMode = SoftInput.AdjustPan)]
谢谢!
【问题讨论】:
-
告诉我您的 MasterDetailPage 代码可能是然后我们将其定位到此
-
我尝试将 X.F 3.3 升级到 X.F 3.4,它的工作完美且速度比 X.F3.3 更快。
标签: android xamarin xamarin.forms xamarin.android splash-screen