summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Fedoskin <afedoskin3@gmail.com>2016-05-22 14:13:08 (GMT)
committerArtem Fedoskin <afedoskin3@gmail.com>2016-05-22 14:13:08 (GMT)
commitf6e2d72aca9f89d3eb597589c6ab25ff0e0f1bfe (patch)
tree045b2f920d5304db9b64c7d2fc96d9181e33dfa3
parentf3cbe01c7593f02609945694d1d37aa74fe79548 (diff)
Changed splash screen so that it looks better on Android (no black screen at the startup, better fits to Android style)
-rw-r--r--apk/res/drawable-hdpi/icon.pngbin0 -> 3715 bytes
-rw-r--r--apk/res/drawable-hdpi/splash.xml11
-rw-r--r--apk/res/drawable-hdpi/splashicon.pngbin0 -> 8834 bytes
-rw-r--r--apk/res/drawable-ldpi/icon.pngbin0 -> 1472 bytes
-rw-r--r--apk/res/drawable-ldpi/splash.xml11
-rw-r--r--apk/res/drawable-mdpi/icon.pngbin0 -> 2509 bytes
-rw-r--r--apk/res/drawable-mdpi/splash.xml11
-rw-r--r--apk/res/drawable-mdpi/splashicon.pngbin0 -> 8834 bytes
-rw-r--r--apk/res/drawable-xhdpi/icon.pngbin0 -> 8834 bytes
-rw-r--r--apk/res/drawable-xhdpi/splash.xml11
-rw-r--r--apk/res/drawable-xhdpi/splashicon.pngbin0 -> 23830 bytes
-rw-r--r--apk/res/drawable-xxhdpi/icon.pngbin0 -> 8834 bytes
-rw-r--r--apk/res/drawable-xxhdpi/splash.xml11
-rw-r--r--apk/res/drawable-xxhdpi/splashicon.pngbin0 -> 23830 bytes
-rw-r--r--apk/res/drawable-xxxhdpi/icon.pngbin0 -> 8834 bytes
-rw-r--r--apk/res/drawable-xxxhdpi/splash.xml11
-rw-r--r--apk/res/drawable-xxxhdpi/splashicon.pngbin0 -> 23830 bytes
-rw-r--r--apk/res/values/apptheme.xml6
-rw-r--r--kstars/auxiliary/kspaths.cpp27
-rw-r--r--kstars/auxiliary/kspaths.h39
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/icons/icon.pngbin0 -> 3715 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/hdpi/splash.pngbin0 -> 8834 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/icons/icon.pngbin0 -> 1472 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/ldpi/splash.pngbin0 -> 8834 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/icons/icon.pngbin0 -> 2509 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/mdpi/splash.pngbin0 -> 8834 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/icons/icon.pngbin0 -> 8834 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xhdpi/splash.pngbin0 -> 23830 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/icons/icon.pngbin0 -> 8834 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxhdpi/splash.pngbin0 -> 23830 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/icons/icon.pngbin0 -> 8834 bytes
-rw-r--r--kstars/kstarslite/qml/modules/images/xxxhdpi/splash.pngbin0 -> 23830 bytes
32 files changed, 138 insertions, 0 deletions
diff --git a/apk/res/drawable-hdpi/icon.png b/apk/res/drawable-hdpi/icon.png
new file mode 100644
index 0000000..dd424c8
--- /dev/null
+++ b/apk/res/drawable-hdpi/icon.png
Binary files differ
diff --git a/apk/res/drawable-hdpi/splash.xml b/apk/res/drawable-hdpi/splash.xml
new file mode 100644
index 0000000..a1e5210
--- /dev/null
+++ b/apk/res/drawable-hdpi/splash.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape android:shape="rectangle" >
+ <solid android:color="#FFFFFFFF"/>
+ </shape>
+ </item>
+ <item>
+ <bitmap android:src="@drawable/splashicon" android:gravity="center" />
+ </item>
+</layer-list>
diff --git a/apk/res/drawable-hdpi/splashicon.png b/apk/res/drawable-hdpi/splashicon.png
new file mode 100644
index 0000000..fccb40b
--- /dev/null
+++ b/apk/res/drawable-hdpi/splashicon.png
Binary files differ
diff --git a/apk/res/drawable-ldpi/icon.png b/apk/res/drawable-ldpi/icon.png
new file mode 100644
index 0000000..98672a7
--- /dev/null
+++ b/apk/res/drawable-ldpi/icon.png
Binary files differ
diff --git a/apk/res/drawable-ldpi/splash.xml b/apk/res/drawable-ldpi/splash.xml
new file mode 100644
index 0000000..a1e5210
--- /dev/null
+++ b/apk/res/drawable-ldpi/splash.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape android:shape="rectangle" >
+ <solid android:color="#FFFFFFFF"/>
+ </shape>
+ </item>
+ <item>
+ <bitmap android:src="@drawable/splashicon" android:gravity="center" />
+ </item>
+</layer-list>
diff --git a/apk/res/drawable-mdpi/icon.png b/apk/res/drawable-mdpi/icon.png
new file mode 100644
index 0000000..3247fa8
--- /dev/null
+++ b/apk/res/drawable-mdpi/icon.png
Binary files differ
diff --git a/apk/res/drawable-mdpi/splash.xml b/apk/res/drawable-mdpi/splash.xml
new file mode 100644
index 0000000..a1e5210
--- /dev/null
+++ b/apk/res/drawable-mdpi/splash.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape android:shape="rectangle" >
+ <solid android:color="#FFFFFFFF"/>
+ </shape>
+ </item>
+ <item>
+ <bitmap android:src="@drawable/splashicon" android:gravity="center" />
+ </item>
+</layer-list>
diff --git a/apk/res/drawable-mdpi/splashicon.png b/apk/res/drawable-mdpi/splashicon.png
new file mode 100644
index 0000000..fccb40b
--- /dev/null
+++ b/apk/res/drawable-mdpi/splashicon.png
Binary files differ
diff --git a/apk/res/drawable-xhdpi/icon.png b/apk/res/drawable-xhdpi/icon.png
new file mode 100644
index 0000000..fccb40b
--- /dev/null
+++ b/apk/res/drawable-xhdpi/icon.png
Binary files differ
diff --git a/apk/res/drawable-xhdpi/splash.xml b/apk/res/drawable-xhdpi/splash.xml
new file mode 100644
index 0000000..a1e5210
--- /dev/null
+++ b/apk/res/drawable-xhdpi/splash.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape android:shape="rectangle" >
+ <solid android:color="#FFFFFFFF"/>
+ </shape>
+ </item>
+ <item>
+ <bitmap android:src="@drawable/splashicon" android:gravity="center" />
+ </item>
+</layer-list>
diff --git a/apk/res/drawable-xhdpi/splashicon.png b/apk/res/drawable-xhdpi/splashicon.png
new file mode 100644
index 0000000..6a8fa57
--- /dev/null
+++ b/apk/res/drawable-xhdpi/splashicon.png
Binary files differ
diff --git a/apk/res/drawable-xxhdpi/icon.png b/apk/res/drawable-xxhdpi/icon.png
new file mode 100644
index 0000000..fccb40b
--- /dev/null
+++ b/apk/res/drawable-xxhdpi/icon.png
Binary files differ
diff --git a/apk/res/drawable-xxhdpi/splash.xml b/apk/res/drawable-xxhdpi/splash.xml
new file mode 100644
index 0000000..a1e5210
--- /dev/null
+++ b/apk/res/drawable-xxhdpi/splash.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape android:shape="rectangle" >
+ <solid android:color="#FFFFFFFF"/>
+ </shape>
+ </item>
+ <item>
+ <bitmap android:src="@drawable/splashicon" android:gravity="center" />
+ </item>
+</layer-list>
diff --git a/apk/res/drawable-xxhdpi/splashicon.png b/apk/res/drawable-xxhdpi/splashicon.png
new file mode 100644
index 0000000..6a8fa57
--- /dev/null
+++ b/apk/res/drawable-xxhdpi/splashicon.png
Binary files differ
diff --git a/apk/res/drawable-xxxhdpi/icon.png b/apk/res/drawable-xxxhdpi/icon.png
new file mode 100644
index 0000000..fccb40b
--- /dev/null
+++ b/apk/res/drawable-xxxhdpi/icon.png
Binary files differ
diff --git a/apk/res/drawable-xxxhdpi/splash.xml b/apk/res/drawable-xxxhdpi/splash.xml
new file mode 100644
index 0000000..a1e5210
--- /dev/null
+++ b/apk/res/drawable-xxxhdpi/splash.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape android:shape="rectangle" >
+ <solid android:color="#FFFFFFFF"/>
+ </shape>
+ </item>
+ <item>
+ <bitmap android:src="@drawable/splashicon" android:gravity="center" />
+ </item>
+</layer-list>
diff --git a/apk/res/drawable-xxxhdpi/splashicon.png b/apk/res/drawable-xxxhdpi/splashicon.png
new file mode 100644
index 0000000..6a8fa57
--- /dev/null
+++ b/apk/res/drawable-xxxhdpi/splashicon.png
Binary files differ
diff --git a/apk/res/values/apptheme.xml b/apk/res/values/apptheme.xml
new file mode 100644
index 0000000..952bc53
--- /dev/null
+++ b/apk/res/values/apptheme.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="AppTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
+ <item name="android:windowBackground">@drawable/splash</item>
+ </style>
+</resources>
diff --git a/kstars/auxiliary/kspaths.cpp b/kstars/auxiliary/kspaths.cpp
new file mode 100644
index 0000000..4ef0988
--- /dev/null
+++ b/kstars/auxiliary/kspaths.cpp
@@ -0,0 +1,27 @@
+#include "auxiliary/kspaths.h"
+
+QString KSPaths::locate(QStandardPaths::StandardLocation location, const QString &fileName,
+ QStandardPaths::LocateOptions options) {
+#ifdef ANDROID
+ QString file = QStandardPaths::locate(location,fileName,options);
+ if(file.isEmpty()) {
+ file = "/data/data/org.kde.kstars/qt-reserved-files/share/kstars/" + fileName;
+ }
+ return file;
+#else
+ return QStandardPaths::locate(location,fileName,options);
+#endif
+}
+
+QStringList KSPaths::locateAll(QStandardPaths::StandardLocation location, const QString &fileName,
+ QStandardPaths::LocateOptions options) {
+#ifdef ANDROID
+ QStringList file = QStandardPaths::locateAll(location,fileName,options);
+ if(file.isEmpty()) {
+ file[0] = "/data/data/org.kde.kstars/qt-reserved-files/share/kstars/" + fileName;
+ }
+ return file;
+#else
+ return QStandardPaths::locateAll(location,fileName,options);
+#endif
+}
diff --git a/kstars/auxiliary/kspaths.h b/kstars/auxiliary/kspaths.h
new file mode 100644
index 0000000..3e0e8f3
--- /dev/null
+++ b/kstars/auxiliary/kspaths.h
@@ -0,0 +1,39 @@
+/** *************************************************************************
+ kspaths.h - K Desktop Planetarium
+ -------------------
+ begin : 20/05/2016
+ copyright : (C) 2016 by Artem Fedoskin
+ email : afedoskin3@gmail.com
+ ***************************************************************************/
+/** *************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KSPATHS_H_
+#define KSPATHS_H_
+#include <QStandardPaths>
+
+/**
+ *@class KSPaths
+ *@short Wrapper for QStandardPaths with Android assets support
+ *The purpose of this class is to search for resources on some platforms with paths that are not
+ *provided by QStandardPaths (e.g. assets:/ on Android that).
+ *@author Artem Fedoskin
+ *@version 1.0
+ */
+
+class KSPaths
+{
+
+public:
+ static QString locate(QStandardPaths::StandardLocation location, const QString &fileName,
+ QStandardPaths::LocateOptions options = QStandardPaths::LocateFile);
+ static QStringList locateAll(QStandardPaths::StandardLocation, const QString &fileNames,
+ QStandardPaths::LocateOptions options = QStandardPaths::LocateFile);
+};
+#endif
diff --git a/kstars/kstarslite/qml/modules/images/hdpi/icons/icon.png b/kstars/kstarslite/qml/modules/images/hdpi/icons/icon.png
new file mode 100644
index 0000000..dd424c8
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/hdpi/icons/icon.png
Binary files differ
diff --git a/kstars/kstarslite/qml/modules/images/hdpi/splash.png b/kstars/kstarslite/qml/modules/images/hdpi/splash.png
new file mode 100644
index 0000000..fccb40b
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/hdpi/splash.png
Binary files differ
diff --git a/kstars/kstarslite/qml/modules/images/ldpi/icons/icon.png b/kstars/kstarslite/qml/modules/images/ldpi/icons/icon.png
new file mode 100644
index 0000000..98672a7
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/ldpi/icons/icon.png
Binary files differ
diff --git a/kstars/kstarslite/qml/modules/images/ldpi/splash.png b/kstars/kstarslite/qml/modules/images/ldpi/splash.png
new file mode 100644
index 0000000..fccb40b
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/ldpi/splash.png
Binary files differ
diff --git a/kstars/kstarslite/qml/modules/images/mdpi/icons/icon.png b/kstars/kstarslite/qml/modules/images/mdpi/icons/icon.png
new file mode 100644
index 0000000..3247fa8
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/mdpi/icons/icon.png
Binary files differ
diff --git a/kstars/kstarslite/qml/modules/images/mdpi/splash.png b/kstars/kstarslite/qml/modules/images/mdpi/splash.png
new file mode 100644
index 0000000..fccb40b
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/mdpi/splash.png
Binary files differ
diff --git a/kstars/kstarslite/qml/modules/images/xhdpi/icons/icon.png b/kstars/kstarslite/qml/modules/images/xhdpi/icons/icon.png
new file mode 100644
index 0000000..fccb40b
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/xhdpi/icons/icon.png
Binary files differ
diff --git a/kstars/kstarslite/qml/modules/images/xhdpi/splash.png b/kstars/kstarslite/qml/modules/images/xhdpi/splash.png
new file mode 100644
index 0000000..6a8fa57
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/xhdpi/splash.png
Binary files differ
diff --git a/kstars/kstarslite/qml/modules/images/xxhdpi/icons/icon.png b/kstars/kstarslite/qml/modules/images/xxhdpi/icons/icon.png
new file mode 100644
index 0000000..fccb40b
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/xxhdpi/icons/icon.png
Binary files differ
diff --git a/kstars/kstarslite/qml/modules/images/xxhdpi/splash.png b/kstars/kstarslite/qml/modules/images/xxhdpi/splash.png
new file mode 100644
index 0000000..6a8fa57
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/xxhdpi/splash.png
Binary files differ
diff --git a/kstars/kstarslite/qml/modules/images/xxxhdpi/icons/icon.png b/kstars/kstarslite/qml/modules/images/xxxhdpi/icons/icon.png
new file mode 100644
index 0000000..fccb40b
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/xxxhdpi/icons/icon.png
Binary files differ
diff --git a/kstars/kstarslite/qml/modules/images/xxxhdpi/splash.png b/kstars/kstarslite/qml/modules/images/xxxhdpi/splash.png
new file mode 100644
index 0000000..6a8fa57
--- /dev/null
+++ b/kstars/kstarslite/qml/modules/images/xxxhdpi/splash.png
Binary files differ