diff --git a/BookAStar/BookAStar.Droid/Resources/values/styles.xml b/BookAStar/BookAStar.Droid/Resources/values/styles.xml
index 9fce3509..368c2f11 100644
--- a/BookAStar/BookAStar.Droid/Resources/values/styles.xml
+++ b/BookAStar/BookAStar.Droid/Resources/values/styles.xml
@@ -6,6 +6,7 @@
- true
- @color/primaryDark
- @color/primaryDark
+ - true
diff --git a/BookAStar/BookAStar/App.xaml.cs b/BookAStar/BookAStar/App.xaml.cs
index 0232ef16..c6f4676e 100644
--- a/BookAStar/BookAStar/App.xaml.cs
+++ b/BookAStar/BookAStar/App.xaml.cs
@@ -5,19 +5,18 @@ using BookAStar.Model.Workflow;
using BookAStar.Pages;
using BookAStar.ViewModels;
using System;
-using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Xamarin.Forms;
-using XLabs.Forms.Controls;
using XLabs.Forms.Mvvm;
using XLabs.Forms.Pages;
using XLabs.Forms.Services;
using XLabs.Ioc;
using XLabs.Platform.Mvvm;
using XLabs.Platform.Services;
+
/*
Glyphish icons from
http://www.glyphish.com/
@@ -33,21 +32,19 @@ namespace BookAStar
public static IPlatform PlatformSpecificInstance { get; set; }
public static string AppName { get; set; }
- public void ShowQueries()
- {
- masterDetail.Detail = bQueriesPage;
- masterDetail.SendBackButtonPressed();
- }
- public void ShowAccounts()
- {
- masterDetail.Detail = accChooserPage;
- masterDetail.SendBackButtonPressed();
- }
+
// Exists in order to dispose of a static instance strongly typed
// TODO : replace all references to this field
// by Views resolution, and then, drop it
public static App CurrentApp { get { return Current as App; } }
+ public static bool MasterPresented {
+ get
+ { return CurrentApp.masterDetail.IsPresented; }
+ internal set
+ { CurrentApp.masterDetail.IsPresented = value; }
+ }
+
public void Init()
{
var app = Resolver.Resolve();
@@ -72,11 +69,11 @@ namespace BookAStar
ViewFactory.Register(
resolver => new DashboardViewModel());
ViewFactory.Register();
+ ViewFactory.Register();
ViewFactory.Register();
ViewFactory.Register();
}
-
ExtendedMasterDetailPage masterDetail;
public App(IPlatform instance)
@@ -86,8 +83,8 @@ namespace BookAStar
Init();
BuildMainPage();
- NavigationPage.SetHasNavigationBar(MainPage, true);
- NavigationPage.SetHasBackButton(MainPage, true);
+ NavigationPage.SetHasNavigationBar(MainPage, false);
+ NavigationPage.SetHasBackButton(MainPage, false);
}
BookQueriesPage bQueriesPage;
AccountChooserPage accChooserPage;
@@ -99,9 +96,9 @@ namespace BookAStar
bQueriesPage = new BookQueriesPage
{
- BindingContext = DataManager.Current.BookQueries,
Title = "Demandes",
- Icon = "icon.png"
+ Icon = "icon.png",
+ BindingContext = new BookQueriesViewModel()
};
home = new HomePage() { Title = "Accueil", Icon = "icon.png" };
@@ -109,16 +106,16 @@ namespace BookAStar
// var mainPage = new NavigationPage(bQueriesPage);
masterDetail = new ExtendedMasterDetailPage() {
- Title="MainPAge"
+ Title="MainPage"
};
masterDetail.Master = new DashboardPage {
Title = "Bookingstar",
BindingContext = new DashboardViewModel() };
- masterDetail.Detail = home;
+ // masterDetail.Detail = home;
-
+ masterDetail.Detail = new NavigationPage(home);
ToolbarItem tiSetts = new ToolbarItem()
{
Text = "Paramètres",
@@ -131,17 +128,7 @@ namespace BookAStar
Icon = "icon.png"
};
- // FIXME "Tabs not supported in this configuration"
- var mainTab = new ExtendedTabbedPage()
- {
- Title = "XLabs",
- SwipeEnabled = true,
- TintColor = Color.White,
- BarTintColor = Color.Blue,
- Badges = { "1", "2", "3" },
- TabBarBackgroundImage = "visuel_sexion.png",
- TabBarSelectedImage = "icon.png",
- };
+ /*
var navPage = new NavigationPage(masterDetail) {
Title = "Navigation",
Icon = "icon.png"
@@ -150,23 +137,14 @@ namespace BookAStar
navPage.ToolbarItems.Add(tiHome);
navPage.ToolbarItems.Add(tiSetts);
-
- this.MainPage = navPage;
-
+ */
+ this.MainPage = masterDetail;
+
Resolver.Resolve()
- .Register(t => new NavigationService(navPage.Navigation))
- ;
+ .Register(t => new NavigationService(masterDetail.Detail.Navigation))
+ ;
}
- internal void EditCommandLine(Page parentPage, BillingLine com)
- {
- EditBillingLinePage editCommandLine = new EditBillingLinePage
- {
- Title = "Edition d'une ligne de facture",
- BindingContext = com
- };
- parentPage.Navigation.PushAsync(editCommandLine);
- }
public void PostDeviceInfo()
{