我使用 XF 和 FreshMVVM 框架,但遇到了 UI 问题
我的代码是:
应用程序.cs
public const string NAVIGATION_LOGIN = "NavigationContainerLogin";
public const string NAVIGATION_MASTER_DETAIL = "NavigationContainterMasterDetail";
private FreshMasterDetailNavigationContainer _mainNav;
private FreshNavigationContainer _loginNav;
public App()
{
//prepare two navigation container
_mainNav = CreateMasterDetailNavigation();
_loginNav = CreateLoginNavigation();
if (Settings.IsSignedIn)
{
MainPage = _mainNav;
}
else
{
MainPage = _loginNav;
}
}
私人 FreshMasterDetailNavigationContainer CreateMasterDetailNavigation() { var masterDetailNav = new FreshMasterDetailNavigationContainer(NAVIGATION_MASTER_DETAIL);
masterDetailNav.Init("eDocine", "hamburger.png");
masterDetailNav.Master = FreshPageModelResolver.ResolvePageModel<MenuPageModel>();
masterDetailNav.Detail = new FreshNavigationContainer(FreshPageModelResolver.ResolvePageModel<HomePageModel>())
{
BarBackgroundColor = Settings.IsDoctorUser ? DataHelper.GreenCoor : DataHelper.BlueColor,
BarTextColor = Color.White
};
return masterDetailNav;
}
private FreshNavigationContainer CreateLoginNavigation()
{
return new FreshNavigationContainer(FreshPageModelResolver.ResolvePageModel<ChooseUserTypePageModel>(), NAVIGATION_LOGIN);
}
public MasterDetailPage RootPage
{
get
{
return MainPage as MasterDetailPage;
}
}
它仅出现在 Android 5+ 上 我该如何解决这个问题?