C# 如何在Android中防止页面转换之间出现白屏?
我注意到我的Android Xamarin.Forms应用程序在页面转换之间临时显示一个白色屏幕。在启动和页面加载之间,我想知道在Xamarin.Forms中处理这种情况的最佳方法是什么 我在我的资源样式中尝试了这些设置,但没有成功:C# 如何在Android中防止页面转换之间出现白屏?,c#,android,xamarin,xamarin.forms,C#,Android,Xamarin,Xamarin.forms,我注意到我的Android Xamarin.Forms应用程序在页面转换之间临时显示一个白色屏幕。在启动和页面加载之间,我想知道在Xamarin.Forms中处理这种情况的最佳方法是什么 我在我的资源样式中尝试了这些设置,但没有成功: <style name="AppDefaultTheme.Base" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowTranslucentSta
<style name="AppDefaultTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowDisablePreview">true</item>
</style>
真的
真的
真的
在我的清单中:
<application
android:label="App"
android:icon="@drawable/AppIcon"
android:theme="@style/AppDefaultTheme">
以前有人遇到过这种情况吗?你最好的方法是什么 这里有一篇关于Xamarin.Android页面转换的文章: 我最好的方法是Xamarin MVVM方式,结合启动屏幕和MainLauncher活动颜色:
<style name="Theme.Splash" parent="android:Theme">
<item name="android:windowBackground">@drawable/splash</item>
<item name="android:windowNoTitle">true</item>
</style>
@可牵引/飞溅
真的
#ffffff
@颜色/应用背景颜色
对于MVVM Xamarin,我指的是首先显示您可以显示的最简单UI和显示加载指示器,以让用户知道在您执行ws异步/等待调用或其他需要花费时间的操作时后台正在发生的事情,以Slack app为例:
这就是你的页面转换将最小化并为你的应用创建更稳定的用户体验的方式
您还可以按照以下步骤创建更快的用户界面:
's-xamarin-forms-performance-tips感谢您的回答。我可以让启动屏幕工作,但页面转换不工作。我认为这是表单的问题,我在新版本的表单中有白屏转换,因为有人找到了解决方案。只需从一个页面导航到另一个页面(或返回页面),屏幕上总是闪烁白色。@Valerie您可以更改这些过渡的颜色。
<style name="AppMainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowBackground">@color/AppBackgroundColor</item>
</style>