cancel
Showing results for 
Search instead for 
Did you mean: 

Is UpdateCenterItem called after animateToItem ?

nico23
Senior II

I have two buttons (up and down) that moves by one step the scroll wheel using the function animateToItem

It seems, but I may be wrong, that UpdateCenterItem is not called when animateToItem, is executed Is it correct?

1 ACCEPTED SOLUTION

Accepted Solutions

@GaetanGodart wrote:

I am not sure what is "UpdateCenterItem".


Per your documentation is the function that it's called specifically for the item currently selected on the scroll wheel


@GaetanGodart wrote:

However, when calling animateToItem, the elements gets updated to show the correct information.


yes, I can confirm that, however if I use in the code the animateToItem(x) the visualization correctly shows the item x as the selected item but, it seems it does not trigger the UpdateCenterItem

Anyway, I've just figured out that the function "is therefore only generated if the usage of a Selected Style Template is selected." which I hadn't selected.

Turning on Selected Style Template made the function animateToItem work

View solution in original post

2 REPLIES 2
GaetanGodart
ST Employee

Hello @nico23 ,

 

I am not sure what is "UpdateCenterItem".

However, when calling animateToItem, the elements gets updated to show the correct information.

Is it not what you experienced?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

@GaetanGodart wrote:

I am not sure what is "UpdateCenterItem".


Per your documentation is the function that it's called specifically for the item currently selected on the scroll wheel


@GaetanGodart wrote:

However, when calling animateToItem, the elements gets updated to show the correct information.


yes, I can confirm that, however if I use in the code the animateToItem(x) the visualization correctly shows the item x as the selected item but, it seems it does not trigger the UpdateCenterItem

Anyway, I've just figured out that the function "is therefore only generated if the usage of a Selected Style Template is selected." which I hadn't selected.

Turning on Selected Style Template made the function animateToItem work