Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 12 additions & 15 deletions QJniHelpers/QJniHelpers.pri
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
android-g++ {
INCLUDEPATH += $$PWD
QT += androidextras

INCLUDEPATH += $$PWD
QT += androidextras
HEADERS += \
$$PWD/QJniHelpers.h \
$$PWD/QJniLangUtils.h \
$$PWD/QAndroidQPAPluginGap.h \
$$PWD/IJniObjectLinker.h \
$$PWD/TJniObjectLinker.h \

HEADERS += \
$$PWD/QJniHelpers.h \
$$PWD/QJniLangUtils.h \
$$PWD/QAndroidQPAPluginGap.h \
$$PWD/IJniObjectLinker.h \
$$PWD/TJniObjectLinker.h \

SOURCES += \
$$PWD/QJniHelpers.cpp \
$$PWD/QJniLangUtils.cpp \
$$PWD/QAndroidQPAPluginGap.cpp \
}
SOURCES += \
$$PWD/QJniHelpers.cpp \
$$PWD/QJniLangUtils.cpp \
$$PWD/QAndroidQPAPluginGap.cpp \
4 changes: 0 additions & 4 deletions QtAndroidHelpers/QtAndroidHelpers.pri
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

android-g++ {

INCLUDEPATH += $$PWD

HEADERS += \
Expand Down Expand Up @@ -53,4 +50,3 @@ SOURCES += \
$$PWD/QAndroidToast.cpp \
$$PWD/QAndroidDesktopUtils.cpp \
$$PWD/QAndroidStorages.cpp
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ public void stop() {
}


private int nominalScreenHeight() {
private int realScreenHeight() {
final Point screenSize = new Point();
mActivity.getWindowManager().getDefaultDisplay().getSize(screenSize);
mActivity.getWindowManager().getDefaultDisplay().getRealSize(screenSize);
return screenSize.y;
}

Expand All @@ -123,7 +123,7 @@ private int visibleDisplayFrameHeight() {
private int getKeyboardSize() {
int keyboardHeight = 0;
try {
final int screenHeight = nominalScreenHeight();
final int screenHeight = realScreenHeight();
keyboardHeight = screenHeight - visibleDisplayFrameHeight();
if (keyboardHeight == 0
|| !SystemNavigationBarInfo.deviceMayHaveFullscreenMode(mActivity) // Fast (cached)
Expand All @@ -140,7 +140,7 @@ private int getKeyboardSize() {
// in the future. But we really have no choice.

/*
Log.d(TAG"getNavigationBarHeightFromConfiguration=" +
Log.d(TAG, "getNavigationBarHeightFromConfiguration=" +
SystemNavigationBarInfo.getNavigationBarHeightFromConfiguration(
Configuration.ORIENTATION_PORTRAIT) +
", screenHeight=" + screenHeight +
Expand All @@ -155,19 +155,13 @@ private int getKeyboardSize() {

final boolean fullscreen = SystemNavigationBarInfo.isInFullscreenMode(mActivity);
final boolean hasNavBarSpace = SystemNavigationBarInfo.hasVerticalNavBarSpace(mActivity);

// Correcting for "control is too high above the keyboard" case
if (!fullscreen && !hasNavBarSpace) {
return keyboardHeight - SystemNavigationBarInfo.getActualNavigationBarControlHeight(mActivity);
}

// Correcting for "control is partially or fully covered by the keyboard" case
if (fullscreen &&
hasNavBarSpace &&
SystemNavigationBarInfo.getActualNavigationBarControlHeight(mActivity) == 0)
{
return keyboardHeight + SystemNavigationBarInfo.getNavigationBarHeightFromConfiguration(
Configuration.ORIENTATION_PORTRAIT);
if (!fullscreen && hasNavBarSpace) {
int navBarHeight = SystemNavigationBarInfo.getActualNavigationBarControlHeight(mActivity);
if (navBarHeight == 0) {
navBarHeight = SystemNavigationBarInfo.getNavigationBarHeightFromConfiguration(
Configuration.ORIENTATION_PORTRAIT);
}
return keyboardHeight - navBarHeight;
}
} catch (final Throwable e) {
Log.e(TAG, "getKeyboardSize exception: " + e);
Expand Down
50 changes: 28 additions & 22 deletions QtOffscreenViews/files.pri
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
HEADERS += \
QOpenGLTextureHolder.h \
QAndroidOffscreenView.h \
QAndroidOffscreenWebView.h \
QAndroidOffscreenEditText.h \
QAndroidJniImagePair.h \
QApplicationActivityObserver.h \
QGraphicsWidgets/QAndroidOffscreenViewGraphicsWidget.h \
QGraphicsWidgets/QOffscreenEditTextGraphicsWidget.h \
QGraphicsWidgets/QOffscreenWebViewGraphicsWidget.h
$$PWD/QOpenGLTextureHolder.h \
$$PWD/QAndroidOffscreenView.h \
$$PWD/QAndroidOffscreenWebView.h \
$$PWD/QAndroidOffscreenEditText.h \
$$PWD/QAndroidJniImagePair.h \
$$PWD/QApplicationActivityObserver.h \
$$PWD/QGraphicsWidgets/QAndroidOffscreenViewGraphicsWidget.h \
$$PWD/QGraphicsWidgets/QOffscreenEditTextGraphicsWidget.h \
$$PWD/QGraphicsWidgets/QOffscreenWebViewGraphicsWidget.h \
$$PWD/QQuickViews/QQuickAndroidOffscreenView.h \
$$PWD/QQuickViews/QQuickOffscreenEditText.h \
$$PWD/QQuickViews/QQuickOffscreenWebView.h

SOURCES += \
QOpenGLTextureHolder.cpp \
QAndroidOffscreenView.cpp \
QAndroidOffscreenWebView.cpp \
QAndroidOffscreenEditText.cpp \
QAndroidJniImagePair.cpp \
QApplicationActivityObserver.cpp \
QGraphicsWidgets/QAndroidOffscreenViewGraphicsWidget.cpp \
QGraphicsWidgets/QOffscreenEditTextGraphicsWidget.cpp \
QGraphicsWidgets/QOffscreenWebViewGraphicsWidget.cpp
$$PWD/QOpenGLTextureHolder.cpp \
$$PWD/QAndroidOffscreenView.cpp \
$$PWD/QAndroidOffscreenWebView.cpp \
$$PWD/QAndroidOffscreenEditText.cpp \
$$PWD/QAndroidJniImagePair.cpp \
$$PWD/QApplicationActivityObserver.cpp \
$$PWD/QGraphicsWidgets/QAndroidOffscreenViewGraphicsWidget.cpp \
$$PWD/QGraphicsWidgets/QOffscreenEditTextGraphicsWidget.cpp \
$$PWD/QGraphicsWidgets/QOffscreenWebViewGraphicsWidget.cpp \
$$PWD/QQuickViews/QQuickAndroidOffscreenView.cpp \
$$PWD/QQuickViews/QQuickOffscreenEditText.cpp \
$$PWD/QQuickViews/QQuickOffscreenWebView.cpp


OTHER_FILES += \
ru.dublgis.offscreenview/OffscreenViewFactory.java \
ru.dublgis.offscreenview/OffscreenView.java \
ru.dublgis.offscreenview/OffscreenWebView.java \
ru.dublgis.offscreenview/OffscreenEditText.java
$$PWD/ru.dublgis.offscreenview/OffscreenViewFactory.java \
$$PWD/ru.dublgis.offscreenview/OffscreenView.java \
$$PWD/ru.dublgis.offscreenview/OffscreenWebView.java \
$$PWD/ru.dublgis.offscreenview/OffscreenEditText.java