aboutsummaryrefslogtreecommitdiffstats
path: root/examples/platforms/android
Commit message (Collapse)AuthorAgeFilesLines
* Android: Bump Gradle and APG versions in QtQ4A examplesOlli Vuolteenaho4 days8-8/+8
| | | | | | | | | This will match them with Q4A. Task-number: QTBUG-138877 Pick-to: 6.10 Change-Id: Ia5cb1954b361f7f0abb788c326045f71da202607 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Examples: Stop using version numbers with QML modulesSze Howe Koh2025-10-283-3/+0
| | | | | | | | | | | | | | | | | | | | | Continues 2d44365f69b9bc946d085c6b149e2ac319700265 and b7f448f8647a9a118cee2d79d446194b20d4b335 * Qt 6.0 enabled and encouraged users to import QML modules without specifying a version number * Qt 6.5 enabled and encouraged users to create QML modules without specifying a version number With this approach, there is little benefit in specifying QT_QML_SOURCE_VERSIONS, especially in an example module that is not consumed by external software. It does not need to worry about compatibility/versioning. Task-number: QTBUG-89033 Task-number: QTBUG-140406 Change-Id: I7f83dc7430180b79b70c75e7ce7b3aef46a028ae Pick-to: 6.10 6.8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Docs: Update existing and add missing links to online Java docsNicholas Bennett2025-09-083-24/+22
| | | | | | | | | | | | | | | | -Updated QtQuickView and QtQuickViewContent links to new pages. -Added links to QtQmlStatus Enum and QtQmlStatusChangeListener interface classes. -Removed the qdoc QtQuickView file. -Updated links in examples and the main Qt Quick for Android page. Task-number: QTBUG-127747 Fixes: QTBUG-138917 Fixes: QTBUG-123106 Fixes: QTBUG-135474 Pick-to: 6.10 6.10.0 6.9 6.8 Change-Id: I61a64c8637c222290e4c630d75d579f6bb23886c Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Docs: Update Qt Quick for Android Example documentationNicholas Bennett2025-08-215-16/+83
| | | | | | | | | | | | | | | | | | | -Fixed the path to the example. -Reduced the example image resolution to improve the layout. -Explained that the QML is defined in main.qml and second.qml. -Include XML layout snippets and info. -Added the imports for the qml types to the snippets and explained them. -Added a link to the Qt Academy course. Fixes: QTBUG-138219 Pick-to: 6.10 Change-Id: I9d59bc1b5b63a3d6a8230cdd83b99efd886744d5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QtQ4A: Update Gradle and Kotlin plugin versions in examplesOlli Vuolteenaho2025-07-156-6/+6
| | | | | | | | | | | Gradle 8.10 -> 8.14.2 Kotlin Android Gradle plugin 2.1.0 -> 2.2.0 Pick-to: 6.10 Task-number: QTBUG-137782 Change-Id: I62b54d2730b1fc48139057d1a4ef0ce4061aaeb0 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
* Bump version to 6.11.0Jani Heikkinen2025-06-144-4/+4
| | | | | Change-Id: If24576debc2246a2a8c244a56c4a69e9a2f6b2e6 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Doc: Fix Linking issuesTopi Reinio2025-05-201-8/+7
| | | | | | | | | | | | | | | | - Fix linking to `QtQuickView` Android class - Fix incorrect link target to section - Fix \sa link to QLocale::createSeparatedList() - Remove link to undocumented header `qqmlregistration.h` - Replace link to non-existent QML type HeaderViewDelegate with actual type name(s). - Fix links to (Horizontal|Vertical)HeaderView::delegate property, as the property is documented in the base type. - Remove \sa links to private member QSGTextNode::doAddTextDocument() Pick-to: 6.9 Change-Id: I3bab7155f8d73af6d51f8cfe890ece6d31671f1d Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* Android: Fix linter problems in QtQ4A examplesOlli Vuolteenaho2025-05-195-5/+5
| | | | | | | | | | | | | | | | | | | | | | In 6.9.1 the Q4A compile SDK version was bumped to 35, which includes a new edge-to-edge feature. For now this was disabled until we can add official support for the feature. When building the QtQ4A examples from the command line a linter is run as part of the build process and this raises a complaint about the disabling of the edge-to-edge feature, as that is not supported until API level 35 and the minSDKLevel is still 28. This should be safe to be ignored which we can do by setting the linter-specific "tools:targetApi" attribute to the element. Amends 3d3f2dcb5ad3a0d57ae39383a9998196948c3d08. Task-number: QTBUG-134880 Fixes: QTBUG-136933 Pick-to: 6.9 6.9.1 6.8 Change-Id: Ie86fdc429ffb9f89ebe23999967a329cd630f194 Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
* Android: QtQuick for Android: Fix example scaling featuresKonsta Alajärvi2025-04-1416-160/+218
| | | | | | | | | | | | | | | | | | | | -set button and other text sizes back -add thumb and track back to switch -Change main relative layout gravity from center_vertical to center_horizontal to make the topMargin take effect -add previous topMargins back -remove layout_margins dimension as there were already dimensions for all the places it was used in -change naming of some dimensions -remove unused dimensions -Adjust text sizes in qtquickview_kotlin and java, they were little too small on high dpi devices -Adjust text sizes, margins and other dimensions in Main and Second.qml files Fixes: QTBUG-134405 Pick-to: 6.9 Change-Id: I35bc7892abe2435bd63b40bca9a21061ae9f0fa8 Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
* Docs: Add code location instructions for Qt Quick for Android examplesNicholas Bennett2025-04-113-0/+6
| | | | | | | | | | Implemented a qdocinc similar to the other one used in general Qt examples. Fixes: QTBUG-135200 Pick-to: 6.8 6.9 Change-Id: I050da4162eea21cdbae00806b40525fc8e566a0c Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
* Disable edge-to-edge feature in qtquickview examplesKonsta Alajärvi2025-03-205-0/+5
| | | | | | | | | | | | | After bumping the Android compile and target versions to 35, disable edge-to-edge feature that arrives with Android 15, because it will be easier for users to work with this for now. Later we'll add support for edge-to-edge feature. Task-number: QTBUG-134880 Pick-to: 6.9 6.8 Change-Id: I8d703c6c6b925a39da9ac8ea6a3d23eaa9b3c3a0 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: update Qt Quick for Android examples to SDK 35Rami Potinkara2025-03-204-8/+8
| | | | | | | | | | | | This patch updates qtdeclarative examples to use SDK 35 as a target and compile version SDK. Task-number: QTBUG-130285 Task-number: QTBUG-129461 Pick-to: 6.9 6.8 Change-Id: Ie11f8bebff7dfeb4c1a87c07826f9e9ef0f78d4b Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* examples: android compile fixTim Blechmann2025-03-073-0/+38
| | | | | | | | | | * add dummy CMakeLists.txt files * add qtabstractlistmodel examples to the examples CMakeLists.txt Change-Id: I9af5bcb79a5cc71e7a4a50a5a674b97ba70538b0 Reviewed-by: Soheil Armin <soheil.armin@qt.io> Reviewed-by: Konsta Alajärvi <konsta.alajarvi@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QtQuickView Java example: Register QML button listener after loadPetri Virkkunen2025-03-031-1/+1
| | | | | | | | | | | | Looks like the expected switch state was flipped at some point, but was forgotten in the initial QML loading handler. Removed the negation in checking the switch status. Fixes: QTBUG-134087 Pick-to: 6.9 6.9.0 Change-Id: I8ee56515145aa992546210bc147dce62652512c1 Reviewed-by: Olli Vuolteenaho <olli.vuolteenaho@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Doc: Fix incorrect \tab macro usageTopi Reinio2025-02-201-12/+12
| | | | | | | | | Resolves QDoc warnings of type Macro '\tab' invoked with too few arguments (expected 4, got 3) Pick-to: 6.9 Change-Id: I1e0dc56daa9eb3a8565e4d691a4504bfa3d0747c Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
* QtQ4A: Fix deprecation warnings in examplesOlli Vuolteenaho2025-02-194-11/+10
| | | | | | | | | | | | | | | Android Studio will default to using JDK21 from Ladybug onwards. This causes deprecation warnings about settings the source/target compatibility to Java 8. The more modern fix would be to use toolchains, but that would apparently require adding a toolchain resolver. To keep it simple let's just update the values to Java 17. Fixes: QTBUG-132802 Pick-to: 6.8 6.9 Change-Id: Ic278a4ea7da8d598cee963dbfce0f6d6c00f0603 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Remove extra space from QmlStatus printoutsOlli Vuolteenaho2025-02-191-4/+4
| | | | | | | | | | | | Just to make things prettier and help with testing (as the final string will be the same in 6.8 and 6.9). Amends 8b6905704eaba702cd337c99f0845ba748f73ffb. Pick-to: 6.9 Fixes: QTBUG-133493 Change-Id: Ic4e5709e150afba7d2fc502f07ea241f25d78205 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Qt Quick for Android: Remove manual orientation handling from examplesKonsta Alajärvi2025-02-199-105/+344
| | | | | | | | | | | | | | | | Remove any code related to manual target device orientation handling from Qt Quick for Android examples. Provide alternative landscape specific layout for examples. Remove unused variables and imports. Move unnecessary global variables to local. Fix couple variable namings in qtquickview_kotlin MainActivity.kt. Fixes: QTBUG-133325 Change-Id: I55ae0df59dd8b02b5f6cfadccc94095d4b7d4ac1 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QQ4A: Fix qtquickview_kotlin compilation errorsPetri Virkkunen2025-02-181-2/+2
| | | | | | | | | | Looks like some variable renaming was missed at some point. Renamed calls to match the actual name of the member variable. Fixes: QTBUG-133276 Change-Id: Ieb7285ae7b617d8a84b3ad59e83f3140dd70f35f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Olli Vuolteenaho <olli.vuolteenaho@qt.io>
* Update Gradle versions in QtQ4A examplesOlli Vuolteenaho2025-01-158-10/+10
| | | | | | | | | | | These versions are currently all over the board, and the intention is to have them in line with the Qt for Android requirements (which is Gradle 8.10 and AGP 8.6). Also update the Kotlin plugins while at it. Task-number: QTBUG-132815 Pick-to: 6.9 6.8 Change-Id: I72d8cb15d80b8b69301bbc2bbfeebf779ef137df Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: remove an extra repository definitionRami Potinkara2025-01-151-1/+0
| | | | | | | | | | | This change removes a duplicate mavenCentral repository definition from qtabstractitemmodel_java settings.gradle file of Qt Quick for Android example. Fixes: QTBUG-132792 Pick-to: 6.9 6.8 Change-Id: Ib4d719a7c12ff536a7da588387badd097edeeeb6 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Update Qt Quick for Android qtabstractitemmodel_java example docsKonsta Alajärvi2025-01-103-16/+29
| | | | | | | | | qtabstractitemmodel_java example was changed to use editable model. Reflect that change in the example docs. Fixes: QTBUG-132395 Change-Id: Ia4d1b33b9b8862efad502fe45e6fbd3584ca274f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Bump version to 6.10.0Jani Heikkinen2025-01-034-4/+4
| | | | | Change-Id: I08b4527cc13f4fb88a2fc5d5c24163e3315e99c9 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Qt Quick for Android: Add editable model to qtabstractitemmodel exampleKonsta Alajärvi2024-12-202-68/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since setData() and dataChanged() methods were added to QtAbstractItemModel Java class, modify the existing model in qtabstractitemmodel example to an editable one to showcase these methods. Changes includes: - Main.qml: - Minor QML coding convention based changes - Changed cell size - Changes that enable cell text editing and forwarding the changes to the model - Changed Text alignment inside cell - Cell text is fetched from new "edit" role MyDataModel.java: - Added override for setData() - Removed not needed roles "column" and "row" and replaced them with new "edit" role - Modified the Cell class to suit better editable model - Squashed generateRow() and generateNewRow() into one generateNewRow() - Added internal datalist updating to removeColumn() Fixes: QTBUG-130254 Change-Id: I791ad33e3b729617a7f53f6553e11fc39878edae Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Qt Quick for Android: Implement new onStatusChanged in examplesKonsta Alajärvi2024-12-112-27/+36
| | | | | | | | | | | | | | | Change currently used onStatusChanged method to new one which delivers the QtQuickViewContent with it in qtquickview examples. To showcase how to use the new onStatusChanged method and how it's useful in an application where there is multiple Qt Quick view contents. Add private variable for current Qt Quick view content and store the content coming with onStatusChanged in it. To avoid unnecessary code execution and warnings in other parts of the example. Task-number: QTBUG-127420 Change-Id: I375d21611c071d0d1b17cef7f51f221b21c74e09 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QtQuickView: Modify multi-view examples to have both views visible at oncePetri Virkkunen2024-12-1013-619/+588
| | | | | | | | | | | | | | | | | | Since we now support having multiple QtQuickViews loaded at once, it was decided that we can modify the existing 1-view, content-switching examples to instead display the available QML views all at once. This change includes: - Necessary QML changes to fit the content onto one view, including text wrapping and anchoring changes - Android layout changes to add a second layout for the second QtQuickView - Source changes to load the second view, rename variables to match the new functionality, and handle orientation changes. Task-number: QTBUG-129288 Change-Id: I5c8c5e3de168365ead6fdbe9cfe7ad6285d4b8bf Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Remove QtTAS 1.0 leftovers from examplesOlli Vuolteenaho2024-11-292-24/+0
| | | | | | | | | | | | | | | | These were used in early versions of the Android Studio plugin to copy and package the libraries created by Qt build before AAR builds were a thing. Probably at some point they were accidentally committed into the examples. I tried builds after these were removed and there was no change to the behavior of the app. Task-number: QTBUG-131673 Pick-to: 6.8 Change-Id: I9f49d24bea3d7da8ba898af966066fb4050defc5 Reviewed-by: Nikunj Arora <nikunj.arora@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Remove useLegacyPackaging from Kotlin examplesOlli Vuolteenaho2024-11-292-10/+0
| | | | | | | | | | | | | The reasons are the same as mentioned in 88660cd34a3161e656b8d2d558544d11ef897d87, but that commit didn't touch the Kotlin examples, probably because of a mistake(?). I tried removing the blocks, and deploying the examples worked without issues. Task-number: QTBUG-131673 Change-Id: I166b39935c479220935a895778fc618119119552 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix String '6.8.0' found in 6.9.0 sources in qtdeclarativeInkamari Harjula2024-11-124-4/+4
| | | | | | | | Occurrences fixed. Task-number: QTBUG-130833 Change-Id: Ideda05852ce9bbfbce3dfa7bdf7c06155c598f46 Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
* Fix indentation in QtBuild tasks in QtQ4A examplesOlli Vuolteenaho2024-11-072-10/+10
| | | | | | | | | | | | | For some reason the Java-based examples have one extra leading whitespace character in the QtBuild task block in build.gradle(.kts). Remove those because they don't look nice and parsing them requires a bit more work. Pick-to: 6.8 Change-Id: Ifbe5cd2e911612f83563a0cc3ec4b16138ce7e5e Reviewed-by: Tero Koponen <tero.koponen@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: remove packagingOptions.jniLibs.useLegacyPackaging propertyAssam Boudjelthia2024-10-312-10/+4
| | | | | | | This is not needed after 0db5b424cdaede8724886e8a1eda1380382d9aaf. Change-Id: Ic5fc2bccf260cfdc159212324fb066d9137753c0 Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
* Docs: Add links to Android classes and examplesNicholas Bennett2024-10-012-3/+3
| | | | | | | | | | | | Added links to the Qt Quick Android Classes page for examples. Added links to the Android Java classes provided by Qt Core. Renamed QML in Android Studio Projects example as Qt Quick for Android-related. Rename filename using qml in Android. Pick-to: 6.8 6.8.0 Change-Id: I79f79971ea7d224545c939a906bb449bd2b886c5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Docs: Fix Android links and add missing onesNicholas Bennett2024-10-011-6/+7
| | | | | | | | | I fixed broken links in the Kotlin example, added missing ones there, and added them to the top-level Qt Android Classes page. Pick-to: 6.8 6.8.0 Change-Id: I70b6a4e9aa02c83c69f20139f4f3a57369cbd954 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Android: Replace Qt snapshot maven, with release maven repoSoheil Armin2024-09-108-16/+4
| | | | | | | | | | | | | | This change replaces the 0.1 SNAPSHOT versions with 1.+ version which means 1.0 and above. We should also remove Qt maven repository URL so the plugin can be fetched from mavenCentral. Task-number: QTBUG-128417 Pick-to: 6.8 Change-Id: Id1006b64f6bf3f0d13d03a4f26b441236aa77cc7 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
* Android: Remove and rephrase comments in examples build.gradle filesKonsta Alajärvi2024-09-024-10/+4
| | | | | | | | | | | | | Remove optional qtKitDir variable and explanation from examples build.gradle files, as it is already mentioned in documentation. Rephrase "Relative for pre-installed (Installer or MaintenanceTool) installations." comment in examples build.gradle files. Task-number: QTTA-111 Pick-to: 6.8 Change-Id: Iee2eda91a994ddab061d636c739a480bd7a946f5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: qtabstractlistmodel_kotlin example settings.gradle.ktsKonsta Alajärvi2024-08-301-1/+1
| | | | | | | | | settings.gradle.kts include statement not working. Pick-to: 6.8 Task-number: QTTA-111 Change-Id: I0dc0ab8b2bf9ad722bdaece05e99651f6914863f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Change qtabstractlistmodel_kotlin example QtBuild projectPathKonsta Alajärvi2024-08-301-1/+1
| | | | | | | | | qtabstractlistmodel_kotlin example QtBuild projectPath points to non existing project. Change to correct one. Pick-to: 6.8 Change-Id: Ic8ff620e6a058ddc83948d9a7f207d4912c64e55 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Change qtabstractlistmodel_kotlin example package nameKonsta Alajärvi2024-08-303-11/+11
| | | | | | | Pick-to: 6.8 Change-Id: I59940e0f8110793e2043bdd10c35db3b307c3400 Reviewed-by: Soheil Armin <soheil.armin@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Fix references to build.gradle in qtabstractlistmodel_kotlin.qdocKonsta Alajärvi2024-08-251-2/+2
| | | | | | | | | | | | QML embedding Kotlin examples gradle build configuration files are migrated to use Kotlin. With the changing file extensions, the documentation reference and snippet do not point to correct file anymore. Task-number: QTTA-111 Pick-to: 6.8 Change-Id: I0496792b1ec59e875dc233e1953dc370bbb0dfcc Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: migrate examples build confs to Kotlin KTSKonsta Alajärvi2024-08-2510-139/+133
| | | | | | | | | | | | | | | | | | Refactor build.gradle(app and top level) from both qtquickview_kotlin and abstractlistmodel_kotlin to Kotlin. Rename build.gradle file extensions Refactor settings.gradle from both examples to Kotlin. Rename settings.gradle file extensions Update build.gradle dependencies in qtquickview_kotlin Task-number: QTTA-111 Pick-to: 6.8 Change-Id: Ife72ba1e7c88d46506292d5aa7f925f485d51866 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Change member names and related docs to .loadContent renameSoheil Armin2024-08-256-78/+78
| | | | | | | | | | | | | | | | | As the QtQuickView.loadComponent() became QtQuickView.loadContent() and the QtQmlComponent renamed to QtQuickViewContent, the member names in examples and related documentation content and documentation links need to reflect the change, where required. This change includes renamings, where they are applicable. There are some cases that the word "component" is a better match, eg. when the sentence is referring to signals or properties which are directly talking about the QML component but not the QtQuickViewContent. Task-number: QTBUG-127084 Pick-to: 6.8 Change-Id: I33ff259d3dfc97fb6b776dd676c19c3eea0842e4 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Reflect renaming of QtQuickView.loadContent() in examplesSoheil Armin2024-08-245-10/+10
| | | | | | | Task-number: QTBUG-127084 Pick-to: 6.8 Change-Id: I087e80e8a826c4db6a1ef15ec52185d2128140d0 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Minor clean for qtquickview_kotlin exampleKonsta Alajärvi2024-08-202-13/+12
| | | | | | | | | | | Remove unused android.view.View import from MainActivity.kt. Synchronize activity_main.xml widget ids with the qtquickview_java example. Pick-to: 6.8 Change-Id: I4bcf6c78fac095232b69ca15f2061db884aedd09 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Android: Support multiple display densities in qtquickview_kotlin exampleKonsta Alajärvi2024-08-1910-42/+187
| | | | | | | | | | | | | | | | | | | | | Added support for varying target display densities for qtquickview_kotlin by adding dedicated activity_main layouts for low,medium,high,xhigh and xxhigh density displays. Whenever example is launched on a device the layout with the corresponding display density will be used. Added target device display density based drawables for SwitchCompat xml widget track and thumb properties, just like with the actity_main layouts. This to be able to scale the SwitchCompat widget with varying densities. Added style.xml files for each target device display density, currently just for SwitchCompat text size. Task-number: QTBUG-124280 Pick-to: 6.8 Change-Id: I7f76bef5da8d8cd94bb74f564cb3efe44a53fb2e Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Android: Support multiple display densities in qtquickview_java exampleKonsta Alajärvi2024-08-1910-42/+188
| | | | | | | | | | | | | | | | | | | | Added support for varying target display densities for qtquickview_java by adding dedicated activity_main layouts for low,medium,high,xhigh and xxhigh density displays. Whenever example is launched on a device the layout with the corresponding display density will be used. Added target device display density based drawables for SwitchCompat xml widget track and thumb properties, just like with the actity_main layouts. This to be able to scale the SwitchCompat widget with varying densities. Added style.xml files for each target device display density, currently just for SwitchCompat text size. Task-number: QTBUG-124280 Pick-to: 6.8 Change-Id: I57404d74694bdd4bb9dcbe123260326c12230013 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Fix button texts and strings.xml in qtabstractitemmodel_javaKonsta Alajärvi2024-08-152-6/+4
| | | | | | | | | | Move hardcoded strings in buttons in activity_main.xml to strings.xml. Remove unused strings in strings.xml. Pick-to: 6.8 Change-Id: Ie7a0da20e7b40a4d6338f5f99f6290c39d32ac97 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Android: Support multiple display densities in qtabstractlistmodel_kotlinKonsta Alajärvi2024-08-146-5/+54
| | | | | | | | | | | | | | | | | Added dimens.xml files for different display densities from where the button margins, textsizes and paddings are fetched according to the current display density. Added corner radiuses for the buttons, to make the corners look the same on different densities. Added top and bottom margins and padding for the buttons, to make them look the same on different densities. Task-number: QTBUG-127848 Pick-to: 6.8 Change-Id: I9e7332af7abe71a4df3d2555803839017aec0896 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* Android: Support multiple display densities in qtabstractitemmodel_javaKonsta Alajärvi2024-08-146-9/+52
| | | | | | | | | | | | | | Added dimens.xml files for different display densities from where the button margins, textsizes and paddings are fetched according to the current display density. Added corner radiuses for the buttons, to make the corners look the similar on different densities. Task-number: QTBUG-127848 Pick-to: 6.8 Change-Id: Idef43338b7636aabb3884efe4a4292489e307849 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
* 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>