void ListView::refreshView() { ssize_t length = _items.size(); for (int i=0; i<length; i++) { Widget* item = _items.at(i); item->setLocalZOrder(i); remedyLayoutParameter(item); } updateInnerContainerSize(); }
void ListView::refreshView() { ccArray* arrayItems = getItems()->data; int length = arrayItems->num; for (int i=0; i<length; i++) { Widget* item = static_cast<Widget*>(arrayItems->arr[i]); item->setZOrder(i); remedyLayoutParameter(item); } updateInnerContainerSize(); }
void UIListViewEx::refreshView() { if (!m_pItems) { return; } ccArray* arrayItems = m_pItems->data; int length = arrayItems->num; for (int i=0; i<length; i++) { UIWidget* item = (UIWidget*)(arrayItems->arr[i]); item->setZOrder(i); remedyLayoutParameter(item); } updateInnerContainerSize(); }
void ListView::doLayout() { if(!_innerContainerDoLayoutDirty) { return; } ssize_t length = _items.size(); for (int i = 0; i < length; ++i) { Widget* item = _items.at(i); item->setLocalZOrder(i); remedyLayoutParameter(item); } updateInnerContainerSize(); _innerContainer->forceDoLayout(); _innerContainerDoLayoutDirty = false; }