summaryrefslogtreecommitdiffstats
path: root/src/android
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Android: Try to hide the sw keyboard on finishComposingText.BogDan Vatra2014-03-201-1/+1
| | | | | | | | | finishComposingText is called when the composing text is finished also when the sw keyboard is hidden. Task-number: QTBUG-37631 Change-Id: I4f4e90e60ac3f89784755b591f578e07fdbfdd2a Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android input method improvementsPaul Olav Tvete2014-03-182-0/+3
| | | | | | | | | | | | | | Use the new inputmethod query API. and get rid of the hack where we would move the cursor back and forwards to make sure that the Android software keyboard noticed that the cursor had moved. The android plugin now uses absolute positions instead of position within the paragraph for all cursor handling (provided that the control supports the new API). Task-number: QTBUG-37511 Change-Id: I03463dbbcb4acbfa41e2eab06889d021d50da01f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Make android non-prefix shadow build usableSamuel Gaist2014-03-141-0/+14
| | | | | | | | | | Until now android developer build was not usable due to missing files. These files are only available after a make install. This patch aims to add that copy phase when building. Task-number: QTBUG-36901 Change-Id: If0a7e982899b8c18495c7cb6508184fa153b239d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Pass the APPLICATION_PARAMETERS variable if defined.BogDan Vatra2014-03-061-5/+9
| | | | | Change-Id: I2a3c049db43bbd0a2c373dae9e9ac1395c099b74 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Display HTML text correctly on Android native dialog.BogDan Vatra2014-03-061-7/+9
| | | | | | | Task-number: QTBUG-35687 Change-Id: I3a298b7f4c5f9608537b1afdb994d76ef3abb706 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Android: Add commercial license to BSD-licensed filesEskil Abrahamsen Blomfeldt2014-03-044-0/+40
| | | | | | | | | These files should also be usable under the commercial license terms as an alternative to the BSD license. Change-Id: If211bb63789722f655843831073ed05ee69811ea Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Android: Make default permissions less confusingEskil Abrahamsen Blomfeldt2014-02-261-2/+7
| | | | | | | | | | Add comments to explain the magic placeholders for default permissions and features, and move the INTERNET and WRITE_EXTERNAL_STORAGE permissions from the manifest so that we use the same mechanism for all default permissions. Change-Id: Ia62dd4314c1c10eb201b5203772ffe88b1ce7a04 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Make full use of QT_ANDROID_RASTER_IMAGE_DEPTH env variable.BogDan Vatra2014-02-223-6/+10
| | | | | | | | If raster only apps set QT_ANDROID_RASTER_IMAGE_DEPTH to 16 (RGB16), we should create also RGB16 native surface. Change-Id: I82692ff34b0e604e627d1d86a437272e3700daf8 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Rework the splash screen for Android.BogDan Vatra2014-02-215-20/+23
| | | | | | | | | | | | | Allow the developers to define a splash screen which will be visible until the first window is created. [ChangeLog][Android] Allow the developers to define a splash screen which will be visible until the first window is created. Task-number: QTBUG-30652 Change-Id: I5da80be417ffffb03e66009f45745d4b387d2912 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Add enablers for listening to activity resultsEskil Abrahamsen Blomfeldt2014-02-152-0/+18
| | | | | | | | | | | | | | | | | | | When you launch an activity through an intent, data can be provided back from the activity when it has finished using onActivityResult() in the activity which launched it. This is okay for applications, since they can easily create their own activities, but does not work for libraries that need to use intents. There is no listener API for activity results which allow external classes to eavesdrop. In order to support launching intents from third-party or add-on libraries, we provide a low-level way to hook into the activity result event. The corresponding public API will be added to QtAndroidExtras. Change-Id: I89417f485e2c0e69028dcccc7c155788346a7417 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: Add Foreign Window supportChristian Strømme2014-02-142-5/+43
| | | | | Change-Id: Ie41edd3f17214805673311a375191cd93d2378f6 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Only Android API < 11 needs o set the surface type.BogDan Vatra2014-01-311-1/+3
| | | | | Change-Id: I290d7273624ce4853a137c00263fa9a169ea0cf9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove unused variable.BogDan Vatra2014-01-311-2/+0
| | | | | Change-Id: I30c6bea769df436f41275df60552b9616e8d5547 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>