Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/299.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在MVVMCross中再次显示启动屏幕_C#_Android_Mvvmcross_Splash Screen - Fatal编程技术网

C# 在MVVMCross中再次显示启动屏幕

C# 在MVVMCross中再次显示启动屏幕,c#,android,mvvmcross,splash-screen,C#,Android,Mvvmcross,Splash Screen,我有一个Android MVVMCross应用程序,将在嵌入式硬件上发布,该应用程序具有“系统重置”功能。该功能只不过是将所有设置清除为默认值,然后将其保留。。。简单快速。但是UX专家希望在系统重置后将其重置回初始屏幕,就像应用程序关闭并重新启动一样(模拟重新启动)。在不编写自定义启动屏幕和不使用MvxSplashScreenActivity基类的情况下,有没有办法做到这一点 我的闪屏是简单的定义。以下是完整的C代码: [活动(MainLauncher=true,NoHistory=true)]

我有一个Android MVVMCross应用程序,将在嵌入式硬件上发布,该应用程序具有“系统重置”功能。该功能只不过是将所有设置清除为默认值,然后将其保留。。。简单快速。但是UX专家希望在系统重置后将其重置回初始屏幕,就像应用程序关闭并重新启动一样(模拟重新启动)。在不编写自定义启动屏幕和不使用MvxSplashScreenActivity基类的情况下,有没有办法做到这一点

我的闪屏是简单的定义。以下是完整的C代码:

[活动(MainLauncher=true,NoHistory=true)]
公共课堂活动:MvxSplashScreenActivity
{
私有ImageView_loadingView=null;
专用定时器_Timer=null;
public SplashScreenActivity():base(Resource.Layout.Splash){}
创建时受保护的覆盖无效(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
_loadingView=FindViewById(Resource.Id.LoadingIndicatorImageView);
_计时器=新计时器(新的TimerCallback(UpdateLoadingImage),null,500500);
}
受保护的void UpdateLoadingImage(对象o)
{
RunOnUiThread(()=>_loadingView.Rotation+=60);
}
}
[Activity(MainLauncher = true, NoHistory = true)]
public class SplashScreenActivity : MvxSplashScreenActivity
{
    private ImageView _loadingView = null;
    private Timer _timer = null;

    public SplashScreenActivity() : base(Resource.Layout.Splash) { }

    protected override void OnCreate(Bundle savedInstanceState)
    {
        base.OnCreate(savedInstanceState);
        _loadingView = FindViewById<ImageView>(Resource.Id.LoadingIndicatorImageView);
        _timer = new Timer(new TimerCallback(UpdateLoadingImage), null, 500, 500);
    }

    protected void UpdateLoadingImage(object o)
    {
        RunOnUiThread(() => _loadingView.Rotation += 60);
    }
}