aboutsummaryrefslogtreecommitdiffstats
path: root/examples/platforms/android
Commit message (Collapse)AuthorAgeFilesLines
...
* Android: Add documentation for QtAbstractListModel examplePetri Virkkunen2024-08-136-21/+179
| | | | | | | | | | | This change includes code snippet markers, some minimal code changes (moving code around for snippet clarity), a screenshot of the example and the main documentation page for the example. Task-number: QTBUG-126841 Pick-to: 6.8 Change-Id: I2a10571f37a70a55b8411f1b7989b47810639386 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Doc: Fix qdoc link warningsAndreas Eliasson2024-08-131-10/+10
| | | | | | | | | Fixes the qdoc link warnings in qtabstractitemmodel_in_android_studio_projects.qdoc Pick-to: 6.8 Change-Id: I8466c50124ca7df7b8f2c6116a4444924a8d75b5 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Android: Correct QtAbstractListModel example directory namesPetri Virkkunen2024-08-0736-11/+11
| | | | | | | | | | To make it more clear that these examples are for the java/kotlin side of QtAbstractListModel, name them according to that class name. Task-number: QTBUG-125976 Pick-to: 6.8 Change-Id: Ie4c3f9a82ab5798035930b186b3ee5b539d69683 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Android: QtQuickView example Qt Gradle Plugin changesRami Potinkara2024-08-034-2/+27
| | | | | | | | | | | | Modified -settings.gradle to use Qt Maven (for now) -build.gradle to use qtgradleplugin from Qt Maven -did same for qtquickview_java and qtquickview_kotlin Task-number: QTBUG-127621 Pick-to: 6.8 Change-Id: Ia3e3b54301c95033139101837460aeb370841afc Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Android: QtAbstractItemModel example synchronizationRami Potinkara2024-08-031-22/+23
| | | | | | | | | | | Added synchronized to each function to synchronize thread execution in the example. Exception is the constructor that can't take synchronized. Task-number: QTBUG-127467 Pick-to: 6.8 Change-Id: I7c7bf8f245dbe484ca8e556769b3acd6732527ee Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Android: Add documentation for QtAbstractItemModel Java API exampleKonsta Alajärvi2024-08-015-22/+218
| | | | | | | | | | | | | | | Adds documentation for Android Studio example application project. Explains how to handle complex data types between Java and QML. Explains the project structure and thread contextes with code examples. Example opens up the usage of two Java API classes QtAbstractItemModel (QtAIM) and QtModelIndex (QtMI). Task-number: QTBUG-126457 Pick-to: 6.8 Change-Id: Ibbd10b74aa415985f3edd0affa8d0301d71aa8c0 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
* Android: QtAbstractItemModel example Qt Gradle Plugin changesRami Potinkara2024-08-012-2/+14
| | | | | | | | | | | | Modified -settings.gradle to use Qt Maven (for now) -build.gradle to use qtgradleplugin from Qt Maven Fixes: QTBUG-127622 Pick-to: 6.8 Change-Id: I35401f4c098fcb5b150c5c68e93ab08d98028eb2 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io> Reviewed-by: Olli Vuolteenaho <olli.vuolteenaho@qt.io>
* Android: QtAbstractListModel kotlin example synchronizationPetri Virkkunen2024-07-311-2/+9
| | | | | | | | | | Annotated each member function of MyListModel with @Synchronized, and added synchronized-block to constructor. Task-number: QTBUG-127467 Pick-to: 6.8 Change-Id: I9fe2d23d0706bf5d247dcaf82a8aa7a987a37286 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Android: QML Embedding: Add Kotlin example showcasing QtAbstractListModelKonsta Alajärvi2024-07-3136-0/+592
| | | | | | | | | | | | | | | | | | | | | | This commit adds two projects, one for Android Studio and the other a regular Qt QML project. The Android Studio project provides two buttons which add and remove rows, a frame for the embedded QML Component to be drawn on, and the QtAbstractListModel which is passed to the QML Component. The QtAbstractListModel contains a list of UUID strings which are randomly generated at init and on request via the Android UI. This data provided to QML has two properties: the UUID string and the row of the requested data as an int. The QML project simply has a ListView that uses the provided QtAbstractListModel to draw elements that display the element data. Task-number: QTBUG-125976 Pick-to: 6.8 Change-Id: I315a85e6d0043c1ff3a15e12458c27f38f573e0b Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Android: Add QtAbstractItemModel Android Java exampleKonsta Alajärvi2024-07-3138-0/+768
| | | | | | | | | | | | | | | | | | | | | Patch adds an Android Studio example application project. Project has a Android project and a Qt project. Qt project can be imported into Android project. Example shows how to handle complex data types between Java and QML. In QML the data use is demonstrated with TableView item and in Java side with model of two-dimensional ArrayList items for Cell's. First dimension of the array list is rows and second is columns. Example uses 26 rows and columns, that matches to amount of alphabets from A to Z. Example opens up the usage of two Java API classes QtAbstractItemModel (QtAIM) and QtModelIndex (QtMI). Task-number: QTBUG-125606 Pick-to: 6.8 Change-Id: I61dee80618d852bf6e42f97f28e0a064987557e0 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Android: Rename QtQuickView Java and Kotlin examplesRami Potinkara2024-07-2976-54/+56
| | | | | | | | | | | | | | | Renamed qml_in_.. starting folders to qtquickview starting ones. After the change this example follows a similar logic as other declarative/examples/platform/android examples. The change also shortened the path to address the Windows path limitation of 260 characters. Updated also documentation and manual tests. Fixes: QTBUG-127067 Pick-to: 6.8 Change-Id: Ie564630e0f924d0b0694bf7c9d47931eab00b422 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Doc: Fix linking issuesTopi Reinio2024-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Fixes the following warnings: (qdoc) warning: Can't link to 'qquickattachedpropertypropagator.html' (qdoc) warning: Can't link to 'Type Of Parameter In Signal Cannot Be Used' (qdoc) warning: Can't link to 'QQmlEngine Class#QML_ELEMENT' (qdoc) warning: Can't link to 'qml-qtqml-component.html' (qdoc) warning: Can't link to 'import paths' (qdoc) warning: Can't link to 'qml-var.html' (qdoc) warning: Can't link to 'Qt Quick Shapes' (qdoc) warning: Can't link to 'Qt Svg' (qdoc) warning: Can't link to 'Native Menus' (qdoc) warning: Can't link to 'Popup Items' (qdoc) warning: Can't link to 'Popup Windows' (qdoc) warning: Can't link to 'Grid QML Type' (qdoc) warning: Can't link to 'layer.smooth' Pick-to: 6.8 Change-Id: Ia61b0568f481018850027f445446f64122abb5fd Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* examples: Consistently require Qt 6.8Fabian Kosmale2024-07-031-2/+2
| | | | | | | | | | | | This prevents policy warnings in a few cases, and we want people to opt-in to new policies, so make our examples copy'n'paste friendly. Pick-to: 6.8 Task-number: QTBUG-126201 Task-number: QTBUG-126468 Change-Id: Iefa666b61c2d2f767da3583f0f6efd8e4a2169e5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
* Documentation follow up for strong typing changes in Kotlin exampleKonsta Alajärvi2024-06-282-7/+19
| | | | | | | | | | | Extend existing documentation of qml_in_android_studio_projects to explain the adding and using of another QtQmlComponent in qml_in_kotlin_based_android_project. Task-number: QTBUG-126050 Pick-to: 6.8 Change-Id: Ib1444ed883c87bcf5c8e3fe9f423dbfef5c8fa66 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Documentation follow up for strong typing changes in Java exampleKonsta Alajärvi2024-06-272-13/+34
| | | | | | | | | | | | | Extend existing documentation of qml_in_android_studio_projects to explain the adding and using of another QtQmlComponent in qml_in_java_based_android_project. Task-number: QTBUG-126050 Pick-to: 6.8 Change-Id: Id5b0708c73c52efbe0c3cae46d2869014fb0bae5 Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
* Add another QML Component into qml_in_kotlin_based_android_projectKonsta Alajärvi2024-06-243-2/+73
| | | | | | | | | | Add implementation for second qml component in qml_in_kotlin_based_android_project Task-number: QTBUG-125099 Pick-to: 6.8 Change-Id: Id0b6c693aac2d67cceda74e623fcd18c9568b84a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Add another Qml component to Java exampleKonsta Alajärvi2024-06-245-12/+166
| | | | | | | | | | | | | Adds another Qml component into the qml_in_android_view example that can be used in qml_in_java_based_android_project. Functionality to load another Qml component in qml_in_java_based_android_project. Task-number: QTBUG-125098 Pick-to: 6.8 Change-Id: If85e977ef0057ab9bca93e7b2136d37b01a5c7de Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Strong typing changes to Qml Embedding Kotlin example documentationKonsta Alajärvi2024-06-182-11/+26
| | | | | | | | | | Change Qml Embedding examples docs to reflect the new strong typing changes in the qml_in_kotlin_based_android_project. Task-number: QTBUG-126050 Pick-to: 6.8 Change-Id: Ic8a6c8acefa32efed93faca90dd776b62c5b8a05 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Strong typing changes to Qml Embedding Java example documentationKonsta Alajärvi2024-06-172-50/+66
| | | | | | | | | | Change Qml Embedding examples docs to reflect the new strong typing changes in the qml_in_java_based_android_project. Task-number: QTBUG-126050 Pick-to: 6.8 Change-Id: I855a0f5043d956b644602dc9feba0d568d464b14 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Use QtQuickView with strong typing in qml_in_kotlin_based_android_projectKonsta Alajärvi2024-06-161-30/+38
| | | | | | | | | Changes the way QtQuickView is used in MainActivity.kt Task-number: QTBUG-125099 Pick-to: 6.8 Change-Id: I9308fc08cd7ddbec8955baccf95fa0c05117e305 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Bumb Android minimum SDK version in qml_embedding Kotlin exampleKonsta Alajärvi2024-06-131-1/+1
| | | | | | | | | | | | | | | | | | Bump Android minmum SDK version in qml_in_kotlin_based_android_project gradle config from 26 -> 28. Qml embedding Kotlin example has a minimum Android SDK set to 26 in the project gradle config. Qt androiddeployqt has a minimum supported Android SDK set to 28 for Qt 6.8. This creates a dependency issue with the included .aar lib built with Qt. Fixes: QTBUG-125961 Pick-to: 6.8 Change-Id: I2bc54d1303ee41e2697a296f973e0bab01f1356c Reviewed-by: Olli Vuolteenaho <olli.vuolteenaho@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Refactor Java example xml widget ids to be more descriptiveKonsta Alajärvi2024-06-042-8/+8
| | | | | | | | Refactor Java example xml widget ids, because some of them were a bit ambiguous. Pick-to: 6.8 Change-Id: I49f6e1bb14d42859164bf12cb386b779dcaaee15 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Bump Android minimum SDK version in qml_embedding Java exampleKonsta Alajärvi2024-06-031-1/+1
| | | | | | | | | | | | | | | | | Bump Android minmum SDK version in qml_in_java_base_androi_project gradle config from 26 -> 28. Qml embedding Java example has a minimum Android SDK set to 26 in the project gradle config. Qt androiddeployqt has a minimum supported Android SDK set to 28 for Qt 6.8. This creates a dependency issue with the included .aar lib built with Qt. Fixes: QTBUG-125961 Pick-to: 6.8 Change-Id: I3b611669ec52621171e9b88f34286fa1b2492faf Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Use QtQuickView with strong typing in qml_in_java_based_android_projectKonsta Alajärvi2024-06-021-51/+52
| | | | | | | | | Changes in the way QtQuickView is used in MainActivity.java Task-number: QTBUG-125098 Change-Id: I4b60bde84df17b8d765bf6a974e4b13cb38f5bc2 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
* Rename qml_in_android_view example main.qml and URIKonsta Alajärvi2024-06-022-2/+2
| | | | | | | | | | | | | | Rename qml_in_android_view example main.qml to Main.qml because qml files starting with lower case letters are considered to be only files not components. Rename qml_in_android_view example URI because if the URI and module name are same there is a class name clash with the Qml Component Java code generation. Covers: QTBUG-125159 Task-number: QTBUG-125098 Change-Id: I40394d890ed680f17fe49d650bc42c2a3d3348e4 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Adds documentation for the qml_in_kotlin_based_android_projects exampleKonsta Alajärvi2024-05-032-24/+112
| | | | | | | | | | | | | | Documented the qml_in_kotlin_based_android_projects example in the same .qdoc file as the qml_in_java_based_projects example. Added snippets tags to MainActivity.kt. Added support for code snippets from .kt files in qtquick.qdocconf. Fixes: QTBUG-123423 Pick-to: 6.7 Change-Id: I5ac4d231bf77a23b4083ca26712949d66c2483c1 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Add example showcasing embedding QML to native Android Kotlin projectKonsta Alajärvi2024-05-0237-7/+692
| | | | | | | | | | Add new project folder qml_in_kotlin_based_android_project which include the new Android Studio project. Fixes: QTBUG-120717 Pick-to: 6.7 Change-Id: I53023c897c92d275018b4e40ab84a3b60e0afa1f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Adds documentation for the qml_in_java_based_android_projects exampleNicholas Bennett2024-04-173-4/+133
| | | | | | | | | | | Added a qdoc file to the top folder and edited the qtquick.qdocconf file to include it as src and for snippets. Task-number: QTBUG-122964 Pick-to: 6.7 Change-Id: I581e369b0682804729a98288164492ac1c604194 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add example showcasing Embedding QML to native Android Java projectKonsta Alajärvi2024-04-1040-0/+843
Add new example showcasing how to embed QML into native Android Java application. New folder platforms/android, which include the new Android Java project and Qt project in their own project folders. Pick-to: 6.7 Fixes: QTBUG-120716 Change-Id: Ibab8b7653eb7d4199b93630d03f3543d0d734c4a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>