2017-03-21 102 views
0

我使用XF和FreshMVVM框架,我有一個問題,UI UI issueXamarin形式和FreshMVVM Android的UI問題

我的代碼是:

App.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(NAVIG ATION_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; 
     } 
    } 

It line only only on Android 5+ 我該如何解決這個問題?

回答