summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/androidjnimain.cpp
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@digia.com>2014-09-08 17:22:42 +0200
committerChristian Stromme <christian.stromme@digia.com>2014-09-26 23:45:13 +0200
commit10a0f93c86e8be018119a07123b88d3e4a5e584c (patch)
tree32b478785da92f72bbb797c16678258245037076 /src/plugins/platforms/android/androidjnimain.cpp
parentafece6e49697983e7fd55647e1674504f7bc7235 (diff)
Android: Add function to change the stacking order in the layout.
This change enables us to reorder the stacking order used by the layout. This is necessary if we want to influence the drawing order. Lowering or raising views are done separately for native views and Qt surface views, that is, the two different view "types" are moved relative to other views of the same type and Native views are always placed on top. Change-Id: I01cbb88f8efee08877b5972cf330fd25266a2aa9 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/plugins/platforms/android/androidjnimain.cpp')
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index e068a43241..11f0bc5ffe 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -401,6 +401,28 @@ namespace QtAndroid
surfaceId);
}
+ void bringChildToFront(int surfaceId)
+ {
+ if (surfaceId == -1)
+ return;
+
+ QJNIObjectPrivate::callStaticMethod<void>(m_applicationClass,
+ "bringChildToFront",
+ "(I)V",
+ surfaceId);
+ }
+
+ void bringChildToBack(int surfaceId)
+ {
+ if (surfaceId == -1)
+ return;
+
+ QJNIObjectPrivate::callStaticMethod<void>(m_applicationClass,
+ "bringChildToBack",
+ "(I)V",
+ surfaceId);
+ }
+
bool blockEventLoopsWhenSuspended()
{
static bool block = qgetenv("QT_BLOCK_EVENT_LOOPS_WHEN_SUSPENDED").toInt();