summaryrefslogtreecommitdiffstats
path: root/src/android
Commit message (Collapse)AuthorAgeFilesLines
* Respect android:windowSoftInputMode in manifest.Samuel Nevala2014-09-041-3/+13
| | | | | | | | | | | Read and store softInputMode set at AndroidManifest.xml on QtActivityDelegate. When showSoftwareKeyboard is requested setSoftInputMode for main window if softInputMode is not defined fall back to old behavior. Change-Id: I71cb27d4bdb4ae4e3c2a0706560173703a2f5a50 Task-number: QTBUG-34401 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Guard against invalid surfaceIDPaul Olav Tvete2014-09-021-1/+4
| | | | | | | | | | | | | | | | Do not try to resize or destroy invalid surfaces. This caused update problems with all GL apps after suspend, since we would forget the dummy view that we always keep around so we get proper transitions on shutdown. Also make sure that we don't mess this up even if we try to destroy a non-existing surface. This would have fixed the bug by itself, but then we would still be stuck with the annoying warning message. Task-number: QTBUG-41093 Change-Id: I83299e93eb9ac5357b98ca47014789b56c91b35a Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Giuseppe D'Angelo2014-08-191-1/+6
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-121-1/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually included changes from 3a347a4e70e5a10ee92dd2578316c926a399e894 in src/opengl/qgl.cpp. Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/android/androidjnimain.cpp Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
| | * Android: Fix QAndroidPlatformServices::openUrl().Christian Strømme2014-08-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Return true only if an activity was found for the intent. Task-number: QTBUG-34716 Change-Id: I764caf1e8afa3b17b2d71f52873c17e5d834a956 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | | Android: Also support android style for debug deploymentEskil Abrahamsen Blomfeldt2014-08-161-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both bundling and debug deployment can use the local cache for the Android style assets, since Ministro is not necessarily available in these cases. Change-Id: I33367aceec1829f27377fcb6793ca95ecf5cc434 Task-number: QTBUG-40676 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | | Forward menu button events to Qt if there is no visible menubar.BogDan Vatra2014-08-162-18/+10
|/ / | | | | | | | | | | Task-number: QTBUG-32334 Change-Id: If1b4517f233b04d4c6c165cbfe62c8cf7b624c60 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Android: Say hello to gradle!BogDan Vatra2014-08-079-17/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add build.gradle script, move Android template files to another folder. These files are specific to every project, and they should be copied to then project android folder. Switching from Ant to Gradle brings lots of advantages: - it is way faster when rebuilding (25-50% faster than ant). - it enables first class Android Studio integration. - adding Android Extras libs (e.g. Google Play services, OBB, etc.) to your project is now painless. [ChangeLog][Android] Added Gradle support to build the APK. Change-Id: I9c8cb355118c9ac1997270c8b80916eca43fce4d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Android: extract window style attributesJ-P Nurmi2014-08-061-0/+28
| | | | | | | | | | | | | | Task-number: QTBUG-39215 Change-Id: I29120f5dcc97051705bc6ebacfa5843d8953810b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: add support for Android.R.attr.state_acceleratedJ-P Nurmi2014-08-061-3/+3
| | | | | | | | | | | | | | | | | | This lets the Qt Quick Controls Android Style choose the appropriate window background that is meant to be used with HW acceleration. Change-Id: I65d6f9319d77364637460e7c4ebb7ea3f4d53f12 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: Fix debugging.BogDan Vatra2014-08-061-0/+7
| | | | | | | | | | | | | | | | | | | | When re-install a package without uninstalling it first, a few files are leftover from the previous installation which makes the debugging to fail. Change-Id: I603491668bcec2a6f8054951ea2dea806fcc4c88 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Android: Extract assets for 'listSeparatorTextViewStyle'Gabriel de Dietrich2014-08-051-0/+1
| | | | | | | | | | | | | | | | These are used in Qt Quick Control's TableViewStyle.headerDelegate. Change-Id: I2d87896b9987b86e30123b34872f9322d304a190 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: Fix exceptions in ExtractStyle.java on Android LBogDan Vatra2014-08-011-3/+15
| | | | | | | | | | | | | | | | | | Android L adds support for 64 bit (arm and x86) and they did lots of changes that are incompatible with old implementation. Task-number: QTBUG-40120 Change-Id: I69b78a9eed896d2ddabc1bf2a55886faeae47974 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Android: Really suspend apps that are put in the backgroundBogDan Vatra2014-07-312-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main event loop will be paused when an application is suspended, this is also the normal behavior of any Android application. When an application is suspended on Android all its Gl surfaces are destroyed and can't be used to render anymore. So, we need to pause the main event loop in order to pause all the timers which might trigger drawings. The event loop is resumed immediately after the application is foreground. AndroidManifest.xml contains more info about how to disable this behavior and what might happen if you do it. [ChangeLog][Android][Important Behavior Changes] The main event loop is now stopped when the app is suspended Task-number: QTBUG-36274 Change-Id: I4c0ba5df9d95f348bca67ea5c76865d6d20775e4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Cache the parsed drawables.BogDan Vatra2014-07-301-0/+22
| | | | | | | | | | Change-Id: I4a386c644505ac84a5ddd15a898c3e9c58e682b3 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Android: extract ListView divider & selectionJ-P Nurmi2014-07-301-0/+29
| | | | | | | | | | Change-Id: I2a4f72d94c4868f9db4b8066bbdadbe222d0da62 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: fix Switch & CalendarView text appearancesJ-P Nurmi2014-07-241-10/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts the extractTextAppearanceInformations() changes done in f7ac2b4 and introduces another method extractTextAppearance() for extracting a specific TextAppearance. The problem was that extractTextAppearanceInformations() was overriding the TextAppearance attributes with TextView attributes. This resulted in wrong text colors for Switch & CalendarView: - Switch_switchTextAppearance - CalendarView_dateTextAppearance - CalendarView_weekDayTextAppearance Change-Id: Ib300b6eb14649319b2f07012803a4d031a717b50 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-141-0/+1
|\| | | | | | | | | | | | | Conflicts: src/gui/text/qfontengine_qpf2.cpp Change-Id: Ib04f92c41d0edd55d3aef8fb1708d917fba0f2a8
| * Android: Prefer "Droid Serif" as default serif fontEskil Abrahamsen Blomfeldt2014-07-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | I've also updated the qfont test so it passes on Android now. Note that there are no suitable cursive/fantasy fonts on Android, so the regular default "Roboto" (or "Droid Sans" on older devices) will be picked here instead. [ChangeLog][Android] Fixed font selection to prefer "Droid Serif" when Serif style hint is set on QFont. Change-Id: I294eebcc4d79410e435bdddce552acc6044753b2 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-012-19/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * Android: Fix hover-event handling.Christian Strømme2014-06-302-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The accessibility delegate needs to intercept the hover events before the view gets them, but since the dispatchHoverEvent() method was added in API level 14 and we build with API level < 14, we can't call the super class implementation (e.g., when the event isn't handled by the accessibility delegate). In the previous implementation we where trying to solve this by using the reflection API, but that does not provide a solution to call the super class implementation (Note: It's possible with JDK 7 or newer), so the code would call itself recursively and we would eventually get a stack overflow exception. This change uses the OnHoverListener class to intercept the hover events, this way we avoid "overriding" the dispatchHoverEvent() method in QtSurface and therefore avoid the problem it causes. Task-number: QTBUG-38905 Change-Id: I8b3cbad718d8524042397bb877e39e3005bfb4ce Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Android: extract actionOverflowButtonStyle (button menu icon)J-P Nurmi2014-06-251-0/+1
| | | | | | | | | | | | Task-number: QTBUG-39215 Change-Id: I6fdb5ab4a7469017505376421d17cf4367baf76f Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Accessibility: Add actions for value interfacesJan Arve Saether2014-06-202-3/+16
| | | | | | | | | | | | | | | | | | | | | | To support increment / decrement of sliders, dials and spin boxes. (anything with an {in,de}crementAction or a valueInterface. Other platforms will follow the same pattern in follow-up patches. Task-number: QTBUG-38832 Change-Id: Ie570acc39b3d9494a8bb9f624b61a398b1d8de89 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Android: extract style attributes for tabsJ-P Nurmi2014-06-201-0/+32
| | | | | | | | | | | | | | Task-number: QTBUG-39215 Change-Id: I727a12fa9696e22d3f31393a0fe2f9392afbfe45 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: fix typo in QtActivityDelegate.javaJ-P Nurmi2014-06-091-4/+4
| | | | | | | | | | Change-Id: I6704627ed0bf7cb70a09c1637084ed2c8e5031cf Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵J-P Nurmi2014-06-072-6/+30
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-052-6/+30
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| | * Android: Fix flashing on startup/shutdownEskil Abrahamsen Blomfeldt2014-06-042-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were several issues on startup of the application which were caused by the fact that we would get the wrong available screen geometry on startup, set this as the initial surface size and then expose native windows with this size. This would cause first a flicker of white on the early expose and the window contents to jump around as the window was resized to the actual available space on screen. The fix for this is to postpone the first expose until we have actually got a proper screen size from the main layout. We use width,height = 0 as an indicator that the available geometry is not yet known, and we skip posting any expose events before this is set by the layout. In addition, since we removed the surface before we shut down the application, it was by a white rectangle before the shutdown transition happens, and this white rectangle will be animated instead of application contents. To rectify this, we make sure the last surface in the stack remains in the layout until it is either replaced by a different surface or until the application has shut down. This way, the shutdown animation will work on this surface instead. [ChangeLog][Android] Fixed regression where there would be flickering on startup and shutdown of the application. Task-number: QTBUG-38960 Change-Id: Ia1579ca8c522d8beeab066f78070ad49009d0238 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | | Android: extract calendarViewStyleJ-P Nurmi2014-06-061-0/+37
|/ / | | | | | | | | | | | | Task-number: QTBUG-39215 Change-Id: Ic11b088cbfa62eb01f4326d557e4434afad9fa10 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Android: extract complete actionBarStyleJ-P Nurmi2014-06-051-1/+36
| | | | | | | | | | | | Task-number: QTBUG-39215 Change-Id: I67d89ac28b73bc52cd2ed952cfc8db21437d6e3b Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: extract switchStyleJ-P Nurmi2014-06-041-2/+46
| | | | | | | | | | | | Task-number: QTBUG-39215 Change-Id: I53c435b80ea2603eb942eac3307654dd0fc0ae12 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: extract styles for ToolBar & ToolButtonJ-P Nurmi2014-06-041-0/+4
| | | | | | | | | | | | Task-number: QTBUG-39215 Change-Id: I1d424436e50f96385b5581444b260c3e27e7291e Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: Introduce SimpleJsonWriterBogDan Vatra2014-06-031-38/+100
| | | | | | | | | | | | | | It speeds up the extraction and it reduces memory consumption. Change-Id: I188f7efbb826343e5bd75f63ace36522f0d7a24d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Android: add support for extracting AnimationDrawableJ-P Nurmi2014-06-031-0/+26
| | | | | | | | | | | | | | | | Required for implementing indeterminate ProgressBar Task-number: QTBUG-39215 Change-Id: I128eaf2879dd493da86541767a870ea786a5ddf9 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: extract View_scrollbarDefaultDelayBeforeFadeJ-P Nurmi2014-05-271-0/+3
| | | | | | | | | | | | Task-number: QTBUG-39215 Change-Id: I8cc6e16a7155710ad322dc884ccbb194ca7d5b67 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: extract scrollViewStyleJ-P Nurmi2014-05-261-0/+19
| | | | | | | | | | | | | | Task-number: QTBUG-39215 Change-Id: I8d4155aa4db5d807d1846c5741c01693af24f846 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Android: ensure unique IDs when extracting style data for layersJ-P Nurmi2014-05-261-2/+5
| | | | | | | | | | | | | | | | | | | | Indeterminate progress drawables can consist of multiple layers that don't necessarily have an ID. Ensure that the extracted file names contains unique IDs to avoid extracted layers overwriting each other. Task-number: QTBUG-35081 Change-Id: I3dc48bf363510ded9b955aa51fa479c607541169 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: extract SeekBar_thumbOffsetJ-P Nurmi2014-05-261-0/+6
| | | | | | | | | | | | Task-number: QTBUG-39215 Change-Id: I2a7b878b1a86280c92a445826f196de3245fd4e2 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: extract progressBarStyle(Small|Large)J-P Nurmi2014-05-261-0/+3
| | | | | | | | | | | | | | | | The indeterminate drawable is used for QtQuick Controls BusyIndicator Task-number: QTBUG-35081 Change-Id: Iecdc6e80444b5134ec1fa61916c7ac1612cd275f Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: add support for extracting RotateDrawableJ-P Nurmi2014-05-261-0/+38
| | | | | | | | | | | | | | | | The rotation attributes are required for implementing BusyIndicator. Task-number: QTBUG-39215 Change-Id: Ief51bf921f61b3b030f26d377b4bfd13913af6c1 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Android: Extract data for native style on startupBogDan Vatra2014-05-224-2/+1368
|/ | | | | | | | | | | | | | | | | When Ministro is not in use, we need to extract style information on startup in order for the native Android style to work. The code to extract data from the device is contributed from the Ministro project. [ChangeLog][Android] Enable using native style also when Ministro deployment mechanism is not in use. Task-number: QTBUG-36019 Change-Id: I2afef5219b4e8fbb2f3e387cbc5e570da1f41011 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Restore fullscreen mode after keyboard is dismissedPaul Olav Tvete2014-05-141-6/+12
| | | | | | | | | | | | Showing the onscreen keyboard will also show the navigation soft buttons. We need to tell Android to re-enable immersive mode after the keyboard is hidden. Since we now do this in two places, refactor the logic. Task-number: QTBUG-36916 Change-Id: Ic69c28f41f5e8cf324d81f9bada3cb148dfb5306 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Accessibility Android: Fix crash for invalid interfacesFrederik Gladhorn2014-05-132-2/+6
| | | | | | | | | | | When asked for an accessibility interface with invalid ID we still return an AccessibilityNodeInfo. But instead of setting that interfaces' ID to the invalid ID, rather return one with no ID set so it will simply fall back to the view. Task-number: QTBUG-38829 Change-Id: If66f5b1b42ba46949d94a547050c7a2cfc7ee9b7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Android: Don't accept the volume-key events.Christian Strømme2014-04-031-0/+15
| | | | | | | | | | | | | | | | | On Android the volume keys are by default connected to the global volume control and by accepting them we remove this feature. Meaning each application would need to re-implement this functionality. Ideally we should only accept the volume keys if they where accepted by the user to avoid overriding default behavior, but we currently don't have the infrastructure to do that. To revert back to the old behavior the env. variable QT_ANDROID_VOLUME_KEYS can be set. Task-number: QTBUG-36570 Change-Id: Ib053a40383f2de452f385b19f7795c2fc23fc4fe Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: implement batch editing for input methodsPaul Olav Tvete2014-03-281-2/+4
| | | | | | Task-number: QTBUG-37584 Change-Id: I59f063b2e4b6427a66f7b561cfae7193ceafa43c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Change Ministro's source to 5.3BogDan Vatra2014-03-271-1/+1
| | | | | | Task-number: QTBUG-37879 Change-Id: If9a3f38a5dc267862a166ac4c8e6940739eab911 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: REG: Fix launching intentsEskil Abrahamsen Blomfeldt2014-03-271-1/+1
| | | | | | | | | | | | | | | When the launch mode is singleInstance, then intents will not be launched as activities inside the same task, but as separate tasks, and onActivityResult() is always called immediately without any data. This is documented in various stack overflows and google group messages if you search for it on the Internet, and the singleInstance launch mode is documented as "not recommended for normal use". This broke e.g. automatic downloads of Ministro. The singleTop launch mode seems more like what we're after, and fixes both the original issue as well as the current problem with intents. Change-Id: Iab24a654a4433f979064509b1ef721db9ef352af Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix software keyboard show/hide stateBogDan Vatra2014-03-262-41/+20
| | | | | | | Task-number: QTBUG-34831 Change-Id: Ic38334d011ceef2dc75e4fb3fcea48f62aeea757 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Set default activity launchMode to singleInstanceBogDan Vatra2014-03-251-1/+2
| | | | | | | | | | This attriute is needed otherwise if the user puts the application in background and uses the appication icon to bring it back in front, andriod will create a new activity. Task-number: QTBUG-37186 Change-Id: Icdc87239c1a07a3e555296692a4866eb6351348e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* REG: Fix compilation with old AndroidManifest.xmlEskil Abrahamsen Blomfeldt2014-03-211-0/+2
| | | | | | | | | | | | | | | | | | For apps created with Qt 5.2.1, the AndroidManifest.xml will contain a reference to android.app.splash_screen, which was removed from the application template when the splash screen functionality was fixed by 4d08d80be60af14c5daed7c6f8d37538aea6c429. To make sure existing apps still compile, we put back a dummy splash.xml so that the reference in existing manifests still work. If this splash screen was actually used for something, it will no longer show up, so we also need to document that people should update their AndroidManifest.xml to the new system, but we can't inform people via mysterious compilation failures :) Task-number: QTBUG-37493 Change-Id: I6289f9b5e2c315fa6db502cbde27bd18e15f1f8d Reviewed-by: Christian Stromme <christian.stromme@digia.com>