Android Question Display page after loading

TheRealMatze

Active Member
Licensed User
Hey,
i have a black page with a large listview. Although lazy loading is activated i see the empty list view white for fractions of a second. The color from the list view is configured, i have no idea where the white is comming from.
This duration is on every call of the page, so it´s not only the first time.
I clear the listview when i leave the page, so it must be the loading-process itself. The speed is nice, it´s only this optical flickering.
Is there a way to hide the page or the listview while it´s loading? I don´t see a "visible"-method on the listview...
I´m using B4xPages.

Regards
Matthias
 

Mahares

Expert
Licensed User
Longtime User
You keep referring to it as lisyview. I think you mean CustomListView or xCLV. At any rate, did you try to set the animation to 0 instead of the default 300 in the xClv layout designer. I think it is more appropriate to use 'Hi' instead of 'Hey' in the forum as it is more formal
 
Upvote 0

TheRealMatze

Active Member
Licensed User
Thanks Mahares! I have all animations, on the page, in the customlistview and in the view containing the listview-elements set to 0. The page needs 0.78s from click to done in debug mode, maybe 1/2 the clv background is white. In release mode is much shorter, i´m unable to measure it, it´s more like a flash.
 
Upvote 0

TheRealMatze

Active Member
Licensed User
I´m still looking for a solution. The animation was already set to 0.
My current try is:
- Create the page on startup (.AddPageandcreate instead of .AddPage)
- Instead of .ShowPage i call the fill-logic from the calling-side
- In the fill-loading-function i set a boolean (pageIsVisible) to false
- in the _VisibleRangeChanged-Event as last operation i check this boolean and call B4XPages.ShowPage one time

It looks like that removes the white flash, but i´m not sure if this is a good idea to use it this way...
 
Upvote 0

TheRealMatze

Active Member
Licensed User
A little update. I found the reason why there is a flicker... It´s the divider-color.
To prevent this i change the divider-color to the background color at the beginning of "visiblerangechanged" and reset it to the wanted color at the end.

clv1.sv.ScrollViewInnerPanel.Color=colors.whatever

That works perfect for me.
 
Upvote 0
Top