Commit f6e2d72a authored by Artem Fedoskin's avatar Artem Fedoskin

Changed splash screen so that it looks better on Android (no black screen at...

Changed splash screen so that it looks better on Android (no black screen at the startup, better fits to Android style)
parent f3cbe01c
<?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>
<?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>
<?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>
<?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>
<?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>
<?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>
<?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>
#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
}
/** *************************************************************************
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment