From 68a7f30bb4d96d0a8ee8f5b9463f3af686fd38dd Mon Sep 17 00:00:00 2001 From: Isaac Salazar Date: Tue, 2 Jun 2015 08:43:41 -0700 Subject: [PATCH] Update to latest goear code --- android/AndroidManifest.xml | 5 ++--- qml/SearchPage.qml | 19 +++++++++++++++++-- qml/main.qml | 7 ++++--- src/downloader.cpp | 2 +- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 1e72c8d..27be66e 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -34,19 +34,18 @@ - + - - + diff --git a/qml/SearchPage.qml b/qml/SearchPage.qml index 120516e..ce64771 100644 --- a/qml/SearchPage.qml +++ b/qml/SearchPage.qml @@ -19,10 +19,12 @@ Page { } onActivated: { - if (!listResults.count) + if (!listResults.count) { textEdit.focus = true - else + } else { Qt.inputMethod.hide() + listResults.forceActiveFocus() + } } titleBar: TitleBar { @@ -97,6 +99,11 @@ Page { } } } + + Keys.onDownPressed: { + if (listResults.count) + listResults.forceActiveFocus() + } } ImageButton { @@ -166,8 +173,16 @@ Page { model: musicStreamer clip: true + highlight: Rectangle { + height: 100 + width: 100 + color: "#343498db" + } + footer: busyFooter delegate: SongDelegate { + Keys.onEnterPressed: addToPlaylist() + Keys.onReturnPressed: addToPlaylist() onPressAndHold: { if (Qt.platform.os === "android") { diff --git a/qml/main.qml b/qml/main.qml index 693d21d..42c8067 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -2,6 +2,7 @@ import QtQuick 2.4 import QtQuick.Controls 1.3 import QtQuick.Window 2.1 import QtMultimedia 5.2 +import QtQuick.Window 2.2 import com.iktwo.components 1.0 import "." @@ -49,8 +50,6 @@ ApplicationWindow { width: resolutions[currentResolution]["width"] height: resolutions[currentResolution]["height"] - - FontLoader { source: "qrc:/fonts/Roboto-Black" } FontLoader { source: "qrc:/fonts/Roboto-BlackItalic" } FontLoader { source: "qrc:/fonts/Roboto-Bold" } @@ -238,6 +237,7 @@ ApplicationWindow { Component.onCompleted: { Theme.titleBarColor = "#0066CC" + Screen.orientationUpdateMask = 1 var now = new Date() now.setHours(0) @@ -245,8 +245,9 @@ ApplicationWindow { now.setSeconds(0) now.setMilliseconds(0) + console.log("ApplicationInfo.timesLaunched:", ApplicationInfo.timesLaunched) // if (ApplicationInfo.timesLaunched > 15 && Math.floor((now.getTime() - ApplicationInfo.firstTimeLaunched.getTime()) / 86400000) >= 5 && Qt.platform.os === "android") { - /// TODO: ANDROID - Show dialog and ask to review + /// TODO: ANDROID - Show dialog and ask to review // } if (font.status === FontLoader.Ready) diff --git a/src/downloader.cpp b/src/downloader.cpp index 2e919f5..e949d16 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -205,7 +205,7 @@ void Downloader::downloadFinished(QNetworkReply *reply) songs = songs.mid(termEnds); - searchTerm = "
  • "; termBegins = songs.indexOf(searchTerm) + searchTerm.length();