Skip to content

Commit

Permalink
Update to latest goear code
Browse files Browse the repository at this point in the history
  • Loading branch information
Iktwo committed Jun 2, 2015
1 parent 096bf98 commit 68a7f30
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
5 changes: 2 additions & 3 deletions android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,18 @@
<!-- Splash screen -->
</activity>
</application>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21"/>
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="21"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>

<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->


<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
Remove the comment if you do not require these default features. -->


<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
</manifest>
19 changes: 17 additions & 2 deletions qml/SearchPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ Page {
}

onActivated: {
if (!listResults.count)
if (!listResults.count) {
textEdit.focus = true
else
} else {
Qt.inputMethod.hide()
listResults.forceActiveFocus()
}
}

titleBar: TitleBar {
Expand Down Expand Up @@ -97,6 +99,11 @@ Page {
}
}
}

Keys.onDownPressed: {
if (listResults.count)
listResults.forceActiveFocus()
}
}

ImageButton {
Expand Down Expand Up @@ -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") {
Expand Down
7 changes: 4 additions & 3 deletions qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "."

Expand Down Expand Up @@ -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" }
Expand Down Expand Up @@ -238,15 +237,17 @@ ApplicationWindow {

Component.onCompleted: {
Theme.titleBarColor = "#0066CC"
Screen.orientationUpdateMask = 1

var now = new Date()
now.setHours(0)
now.setMinutes(0)
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)
Expand Down
2 changes: 1 addition & 1 deletion src/downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void Downloader::downloadFinished(QNetworkReply *reply)

songs = songs.mid(termEnds);

searchTerm = "<li class=\"title\"><h4><a title=";
searchTerm = "<li class=\"title\"><h4><a class=\"\" title=";
closingTerm = "</a></h4></li>";

termBegins = songs.indexOf(searchTerm) + searchTerm.length();
Expand Down

0 comments on commit 68a7f30

Please sign in to comment.