Android ListView perfomance
-
I have to use a ListView which model has about 50 elements.
The delegate now is this:
@Rectangle {
id: rect
height: width*2; width: parent.width
color: "#00CC99"
anchors.horizontalCenter: parent.horizontalCenterText { anchors.centerIn: parent text: n_casella font.pixelSize : 30 } }@
It occupies almost the entire page, so on my phone it's unusable because it's too slow when I move form an index to another.
So the question is How can I increase performance in a smart way? It may be better to use a png instead of a Rectangle{} ?
-
What would be the width and height of your item ?
-
If I run the project on the desktop, width: 320; height: 640
-
This article is worth to read "Performance_tip_QML_other":http://qt-project.org/wiki/Performance_tip_QML_other.
Also there's property "pixelAligned":http://qt-project.org/doc/qt-5.1/qtquick/qml-qtquick2-flickable.html#pixelAligned-prop for Flickable (inherited by ListView). Try setting it to true, may be it would optimize your view.