touchgfx scroll list scroll acceleration configuration not working
We have an issue with a scroll list widget, on the hardware when you touch and scroll to a point, stop then lift your finger of the display the list accelerates in the direction it was dragged in initially. This behaviour is not seen the simulator.
In the designer, we have scrollable container with a scroll list inside it. Setting animation has no effect, easing option = In, Swipe Acc = 0, Drag Acc = 0, Overshoot % = 0. we have tried adjusting the both Acc without any effect.
The list has up to 50 entries.
scroll list
void listMenuView::setupScreen()
{
menuItems = presenter->getListItermParams();
scrollList1.setItemSelectedCallback(scrollListItemSelectedCallback);
params = static_cast<CONTROL_VERTICAL_MENU_T *>(presenter->getWidgetParams());
menuHeader1.params = ¶ms->menuHeader;
menuHeader1.updateConfigs();
menuHeader1.setEventListener(this);
messageBox1.setEventListener(this);
// set the size of the scroll list based on the number of items and iterm hight.
float h = scrollList1ListItems[0].getItemHeight(); // get the height of the first item.
h += 0.98f; // add a little extra to make sure the last item is fully visible.
h *= params->visibleItems; // multiply by the number of items.
// Note: make sure the height of the scroll list window size in touchgfx is
// large enough to show the max list when generating code.
scrollList1.setPosition(0, 0, 459, h);
scrollList1.setNumberOfItems(params->visibleItems);
scrollList1.invalidate();
scrollableContainer1.invalidate();
// give each list entry a unique ID.
uint8_t id{0};
for (auto it = menuItems->begin(); it != menuItems->end(); it++) {
if (it->second.state == ItemState::NORMAL ||
it->second.state == ItemState::READONLY ||
it->second.state == ItemState::SELECTED)
{
scrollList1ListItems[id].setID(id);
scrollList1ListItems[id].bindParams(&it->second);
scrollList1ListItems[id].update();
// handle list with a tick mark.
if (params->hasTickMark) {
if (id == params->tickMarkIndex) {
scrollList1ListItems[id].setTickMark();
} else {
scrollList1ListItems[id].clearRightIcons();
}
}
id++;
}
}Any ideas on what we are missing, how to resolve the issue?
Eddie
