Add a function that minimizes the Android app (#692)
Add a function that minimizes the Android app
This commit is contained in:
parent
db8d966fac
commit
c6e6f2ae84
7 changed files with 25 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
#include "platforms/android/android_controller.h"
|
||||
#include "platforms/android/android_utils.h"
|
||||
#include <QJniObject>
|
||||
#endif
|
||||
|
@ -74,6 +75,13 @@ void PageController::closeWindow()
|
|||
#endif
|
||||
}
|
||||
|
||||
void PageController::hideWindow()
|
||||
{
|
||||
#ifdef Q_OS_ANDROID
|
||||
AndroidController::instance()->minimizeApp();
|
||||
#endif
|
||||
}
|
||||
|
||||
void PageController::keyPressEvent(Qt::Key key)
|
||||
{
|
||||
switch (key) {
|
||||
|
|
|
@ -76,6 +76,7 @@ public slots:
|
|||
QString getPagePath(PageLoader::PageEnum page);
|
||||
|
||||
void closeWindow();
|
||||
void hideWindow();
|
||||
void keyPressEvent(Qt::Key key);
|
||||
|
||||
unsigned int getInitialPageNavigationBarColor();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue