diff --git a/app/app.css b/app/app.css index 20c4a92..f2f3077 100644 --- a/app/app.css +++ b/app/app.css @@ -11,4 +11,23 @@ .cell-view { border-width: 1; border-color: lightgray; + padding: 10; + background-color: gray; +} + +GridLayout { + background-color: gray; + color: white; +} + +ListView { + background-color: gray; +} + +Image { + margin: 0 8 0 0; +} + +Button { + background-color: orange; } \ No newline at end of file diff --git a/app/full-screen-page.js b/app/full-screen-page.js index acb7c27..99bac58 100644 --- a/app/full-screen-page.js +++ b/app/full-screen-page.js @@ -1,26 +1,29 @@ var Observable = require("data/observable").Observable; -var mainViewModel = require("./main-page").mainViewModel; +var mainViewModel = require("./main-page").mainViewModel; var imageSource = require("image-source"); var fs = require("file-system"); - var frameModule = require("ui/frame"); function navigatedTo(args) { var page = args.object; - var selectedImage = args.context; - - page.bindingContext = new Observable({ - name: selectedImage.imageName, - image: null // This will generate get/set for image that notify on property changes - }); - - selectedImage.getImage({ maxWidth: 600, maxHeight: 800}).then(function(imageSource) { - console.log("Retrieved image: " + imageSource); - page.bindingContext.image = imageSource; - }).catch(function(e) { - console.log("Error: " + e); - }); + + var context = page.navigationContext; + page.bindingContext = context; + + for (const key in context) { + if (context.hasOwnProperty(key)) { + const element = context[key]; + console.log(element); + } + } + + // selectedImage.getImage({ maxWidth: 600, maxHeight: 800 }).then(function (imageSource) { + // console.log("Retrieved image: " + imageSource); + // page.bindingContext.image = imageSource; + // }).catch(function (e) { + // console.log("Error: " + e); + // }); } function onGoBack(args) { diff --git a/app/full-screen-page.xml b/app/full-screen-page.xml index 6f4842d..1d4c07a 100644 --- a/app/full-screen-page.xml +++ b/app/full-screen-page.xml @@ -1,7 +1,7 @@ - -