Have android build use material theme and splash. Fix no context drawer on mobile.
This commit is contained in:
@@ -18,6 +18,8 @@
|
|||||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc"
|
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc"
|
||||||
android:name="org.qtproject.qt5.android.bindings.QtActivity"
|
android:name="org.qtproject.qt5.android.bindings.QtActivity"
|
||||||
android:label="Vehicle Voyage"
|
android:label="Vehicle Voyage"
|
||||||
|
android:icon="@drawable/logo"
|
||||||
|
android:theme="@style/AppTheme"
|
||||||
android:screenOrientation="unspecified"
|
android:screenOrientation="unspecified"
|
||||||
android:launchMode="singleTop">
|
android:launchMode="singleTop">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|||||||
6
packaging/android/res/values/apptheme.xml
Normal file
6
packaging/android/res/values/apptheme.xml
Normal file
@@ -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_logo</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -7,7 +7,7 @@ set(vehiclevoyage_SRCS
|
|||||||
|
|
||||||
qt5_add_resources(RESOURCES resources.qrc)
|
qt5_add_resources(RESOURCES resources.qrc)
|
||||||
add_executable(vehiclevoyage ${vehiclevoyage_SRCS} ${RESOURCES})
|
add_executable(vehiclevoyage ${vehiclevoyage_SRCS} ${RESOURCES})
|
||||||
target_link_libraries(vehiclevoyage Qt5::Core Qt5::Qml Qt5::Quick Qt5::Sql Qt5::Svg Qt5::Widgets KF5::CoreAddons)
|
target_link_libraries(vehiclevoyage Qt5::Core Qt5::Qml Qt5::Quick Qt5::QuickControls2 Qt5::Sql Qt5::Svg Qt5::Widgets KF5::CoreAddons)
|
||||||
install(TARGETS vehiclevoyage ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS vehiclevoyage ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
|
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ Kirigami.ApplicationWindow {
|
|||||||
ListElement {value: 5; text: qsTr("Serpentine Belt Changed");}
|
ListElement {value: 5; text: qsTr("Serpentine Belt Changed");}
|
||||||
ListElement {value: -1; text: qsTr("Other");}
|
ListElement {value: -1; text: qsTr("Other");}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
contextDrawer: Kirigami.ContextDrawer {
|
||||||
|
id: contextDrawer
|
||||||
|
}
|
||||||
|
|
||||||
Kirigami.PageRouter {
|
Kirigami.PageRouter {
|
||||||
id: router
|
id: router
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QSqlQuery>
|
#include <QSqlQuery>
|
||||||
#include <QQmlContext>
|
#include <QQmlContext>
|
||||||
|
#include <QtQuickControls2/QQuickStyle>
|
||||||
#include "db/sqlvehicle.h"
|
#include "db/sqlvehicle.h"
|
||||||
#include "db/sqlservicerecord.h"
|
#include "db/sqlservicerecord.h"
|
||||||
#include "jsonio.h"
|
#include "jsonio.h"
|
||||||
@@ -37,6 +38,10 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
|||||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
|
#ifdef Q_OS_ANDROID
|
||||||
|
QQuickStyle::setStyle("Material");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
KAboutData aboutData("org.eyecreate.vehiclevoyage", "Vehicle Voyage", "1.0", "Track vehicle service history.",KAboutLicense::GPL_V3);//TODO:i18n
|
KAboutData aboutData("org.eyecreate.vehiclevoyage", "Vehicle Voyage", "1.0", "Track vehicle service history.",KAboutLicense::GPL_V3);//TODO:i18n
|
||||||
|
|||||||
6
src/qtquickcontrols2.conf
Normal file
6
src/qtquickcontrols2.conf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
[Material]
|
||||||
|
Primary=Indigo
|
||||||
|
Accent=Amber
|
||||||
|
Theme=System
|
||||||
|
|
||||||
@@ -3,5 +3,6 @@
|
|||||||
<file alias="main.qml">contents/ui/main.qml</file>
|
<file alias="main.qml">contents/ui/main.qml</file>
|
||||||
<file alias="speed.svg">contents/speed.svg</file>
|
<file alias="speed.svg">contents/speed.svg</file>
|
||||||
<file alias="license.svg">contents/license.svg</file>
|
<file alias="license.svg">contents/license.svg</file>
|
||||||
|
<file>qtquickcontrols2.conf</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
Reference in New Issue
Block a user