-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>
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 3d3f2dcb5a.
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>
-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>
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>
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>
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 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>
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>
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>
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>
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>
The reasons are the same as mentioned in
88660cd34a, 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>
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>
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>
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>
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>
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>
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>
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>