Update item in scroll wheel without scrolling
I have a scroll wheel with selected item. Is it possible to update the selected item, e.g. its font color, when the modelListener notifys the screen that a certain event has happened?
Example: Let's assume the model contains a counter and notifys the screen if the current value is even or odd. For even values, the text of the selected item in the scroll wheel should be blue and for odd values green.
How can I achieve this?
I managed to kind of do it by calling a function that does the follwing:
void ScrollWheelScreenView::updateSelectedItem
{
touchgfx::Drawable* d = scrollWheel1SelectedListItems.getDrawable(0);
ContainerSelectedScrollItem* cc = (ContainerSelectedScrollItem*)d;
cc->setOddOrEven();
cc->setTextAndIcon(indexCenterItem - 1)
}This function is called in the presenter-implementation of the notify-function. The text color is updated, but the text itself is not always correct: If the odd/even-update happens while scrolling, the text of the next or previous item is displayed.
