Example #1
0
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();
}
Example #3
0
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();
}
Example #4
0
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;
}