Android Question Using Dashboard and LoadLayout

EduardoElias

Well-Known Member
Licensed User
Longtime User
Hi there

I am using Dashboard to insert Panels of same dimension.


B4X:
    Do While i < MaxCupons
        Comand(i).Initialize("")
        Comand(i).Color = Colors.Black
        dashboard.AddView(Comand(i), Config.GetIntegerDef("painellargura", 250dip), Config.GetIntegerDef("painelaltura", 300dip))
        Comand(i).Height = Config.GetIntegerDef("painelaltura", 300dip)
        Comand(i).Width = Config.GetIntegerDef("painellargura", 250dip)
        Comand(i).Tag = 0
        i = i + 1
    Loop

Then I do a loop to load a layout inside each Comand(i) and set the values of labels etc

All works fine

After some time I delete this view and rebuild it again with new data

I dont know what I made that changed the behavior of this view and now instead of just delete and redraw with no FLICKERING

it is now showing like an animation effect, the contents of the LoadLayout is starting as a tiny panel and growing smoothly til it reach the expected size.

a) I dont want this effect to happen, I want no effect, the result for the user will be an updated screen with no flickering since the objects are the same in with the same position/size just change data.

EDIT: I have colored the Comand(i) panel to differentiate from the activity background and it is created in the right size. So seems that it is the Loaded Layout that is doing the effect of increasing until it reaches the size of the parent panel

b) having Comand(i) that is a panel, there is a Layout inside, when doing the LoadLayout I am able to directly set the Labels by name used on the layout. How can I access the same Label on this array after I have all defined, how can I SET the current layout that I am using?
 
Last edited:
Top