From 0ae7051fbee32bc7bd2cbe452c78400ac7bb18d1 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Mon, 23 Mar 2015 14:13:32 +0100 Subject: Fix loading of image and show image beneath texts Change-Id: I3c623dc0db720083bc2c0c4ef53e70ccf208bfd8 Reviewed-by: Alex Blasche --- examples/nfc/poster/poster.qml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'examples') diff --git a/examples/nfc/poster/poster.qml b/examples/nfc/poster/poster.qml index 499839e7..e7b5bba3 100644 --- a/examples/nfc/poster/poster.qml +++ b/examples/nfc/poster/poster.qml @@ -91,7 +91,7 @@ Rectangle { } break; case NdefRecord.Mime: - if (messageRecords[i].type.startsWith("image/")) { + if (messageRecords[i].type.indexOf("image/") === 0 ) { posterImage.source = messageRecords[i].uri; found = true; } @@ -115,15 +115,6 @@ Rectangle { font.pointSize: 18 } - Text { - id: posterText - anchors.horizontalCenter: parent.right - anchors.horizontalCenterOffset: - parent.width / 4 - y: -height - font.bold: true - font.pointSize: 18 - } - Image { id: posterImage scale: Image.PreserveAspectFit @@ -134,6 +125,15 @@ Rectangle { smooth: true } + Text { + id: posterText + anchors.horizontalCenter: parent.right + anchors.horizontalCenterOffset: - parent.width / 4 + y: -height + font.bold: true + font.pointSize: 18 + } + Text { id: posterUrl anchors.horizontalCenter: parent.right -- cgit v1.2.3