Hi!
So did get to test it finally! It works much better than before now! Great!
-The scaling issue seems gone, and the graphics are sharp like they should! Fantastic!
-The scrolling works also now like it should - yey! (But should the scrollbar be visible?)
-Setting some items using style=“width:100%;height:100%” seem to work now! But not the top level element - using style to that there doesnt seem to work yet!
I’ve only had time to test using a very basic test app so far, but will continue to test things!
Looking very good so far! (Screenshot from the app on my S10+)
Perfect, so yeah, its not 100% done yet, but all the things you mentioned are the things i thought would have been fixed, and the other are the things i thought wouldnt have… so thats good!
Ill look at the others tomorrow, the 100% one is interesting, and possibly a bug in haxeui-kha in general, the scrollbar being visible is that “mobile” style isnt being added automatically (as it is in openfl), ill check that out also… you could do <scrollview styleNames="mobile" /> for now while i look into adding that by default for android builds.
Hey. So trying the latest from git it does not fix it… With style=‘width:100%’ it seems the top element aligns as if the size is zero… check the screenshot. Its also however exactly the same bug on HTML5 - desktop.
Note that if i use width=“100%” it works just fine! Its just with “style”
Yes correct. The result is the same both on mobile and html5 (did not get a chance to test other targets yet).
Are you not getting the same results in your testing?
I hadnt tried using the style values, which i will do later. I was pretty sure it wouldnt have been an issue as they should do the same thing, but clearly dont! It may very well be something related to that issue above, its weird though as other backends dont exhibit this behavior and it should be the same code really. I do have a preliminary thought of what it could be - ill test it out later.
Thanks!
PS: did the scrollbars work themselves out on latest haxeui-kha (git)? It should automatically add the :mobile psuedo class now.
Hm… So i’ve found a new issue here… regarding ListView on Kha-mobile…
It seems for whatever reason that the performance is -really- bad.
A simple list with 100 items runs very slow, and if i put in an itemrenderer with a box and two labels
the performance drops to something like 3-4 fps… Any idea?
[Edit: seems performance is also an issue with adding many items to a scrollview, although not as bad… But it makes me wonder if its really realistic to use this at all to build a mobile app… Kha is quite performant usually so i would have thought this would have worked a bit better…Maybe its related to how components are drawn… Any thoughts? ]
Hmmm… can you set “virtual=true” on the listview? Though 100 items certainly doesnt sound like alot so shouldnt really need anything like that. For good measure can you zip up your application (assuming its a test application) and attach it so we are talking about the exact same thing.
Ok, so using virtual=true gives me a significant boost, especially with the item renderer… The speed on a simple list and with an item renderer seem similar now… That being said - its still choppy …maybe ruinning at 20-30 fps… on an Samsung Galaxy S10+
Thanks - looking at this now - 100 items really isnt enough to warrant having to use a virtual listview (its for 100,000’s or millions), so something is up.
Interesting, its the drawing of the text that is slowing it down LOADS… Still investigating it, but if i remove any of the kha “drawString” calls its totally fine
Hm… That sounds strange. Looking at the kha source code the drawstring is building a buffer with a quad pr letter - and this is drawn together with other stuff… pretty standard way to do it… But if thats right it means there’s only one drawcall to the GPU, with just a few quads… So there should be no way that alone would cause a slowdown like that… Sure its not related to layout or something being drawn multiple times?
[Edit : Did some isolated tests with DrawString, see screenshot - running smooth at 60fps here… ]
Hm. Well using g.scissor helps with performance… But still… Clearly Kha can render lots of drawStrings without a big performance loss, so that alone cant be the reason the app slows down so bad… I can try to do more testing here…
Yeah, im certainly not arguing that kha cant draw 100 strings on the screen, but at the same time if you comment out that line things go “back to normal” so the way haxeui is drawing strings is doing something strange, but i honestly cant think what… is your test app (non haxeui) drawing strings every frame in in the render loop?
Aha. So the number of drawcalls goes up way because of this. So the solution is either to use a custom shader or even better group all similar drawcommands and draw them together all at once. Then it should be able to be one drawcall pr type and hopefully fix the issues… Will it be possible to do? Depends on way haxeui does layout and drawing?