, __pEmptyText(null)
, __pAccessibilityElement(null)
, __redrawListView(true)
- , __isBoundsChanged(false)
+ , __isOrientationChanged(false)
, __needReloadItems(false)
, __pItemNeedsLazyDeletion(null)
, __pPropagatedTouchEventListener(null)
_GroupedListViewImpl::SetItemProvider(IGroupedListViewItemProvider& provider)
{
result r = E_SUCCESS;
- float itemWidth = GetCore().GetBoundsF().width;
+ float itemWidth = GetBoundsF().width;
if (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION)
{
_GroupedListViewImpl::SetItemProvider(IGroupedListViewItemProviderF& provider)
{
result r = E_SUCCESS;
- float itemWidth = GetCore().GetBoundsF().width;
+ float itemWidth = GetBoundsF().width;
if (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION)
{
}
result
-_GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, ListRefreshType type, bool needFlush)
+_GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, ListRefreshType type)
{
result r = E_SUCCESS;
CheckEmptyListShowState();
- if (needFlush)
- {
- Draw();
- Show();
- }
+ Draw();
+ Show();
SetLastResultReturn(r);
}
pContainer->AddElement(*__pAccessibilityElement);
}
- Rectangle bounds = GetCore().GetBounds();
+ Rectangle bounds = GetBounds();
__pAccessibilityElement->SetBounds(Rectangle(0, 0, bounds.width, bounds.height));
String accessibilityLable;
{
_ControlImpl::OnChangeLayout(orientation);
- __isBoundsChanged = true;
+ __isOrientationChanged = true;
}
void
SetTextOfEmptyList(__pEmptyText->GetText());
}
- if (__isBoundsChanged)
+ if (__isOrientationChanged)
{
- int firstGroup = -1;
- int firstItem = -1;
- int lastGroup = -1;
- int lastItem = -1;
- int currentItem = -1;
- int lastItemInGroup = -1;
-
- GetCore().GetFirstLoadedItemIndex(firstGroup, firstItem);
- GetCore().GetLastLoadedItemIndex(lastGroup, lastItem);
-
- for (int i = firstGroup; i <= lastGroup; i++)
- {
- currentItem = ((i == firstGroup) ? firstItem : -1);
- lastItemInGroup = ((i == lastGroup) ? lastItem : GetCore().GetItemCountAt(i));
-
- for (; currentItem <= lastItemInGroup; currentItem++)
- {
- _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(i, currentItem));
-
- if (pListViewItem != null)
- {
- RefreshList(i, currentItem, LIST_REFRESH_TYPE_ITEM_MODIFY, false);
- }
- }
- }
-
- __isBoundsChanged = false;
+ __isOrientationChanged = false;
+ UpdateList();
}
}
for (int i = firstGroup; i <= lastGroup; i++)
{
currentItem = ((i == firstGroup) ? firstItem : -1);
- lastItemInGroup = ((i == lastGroup) ? lastItem : GetCore().GetItemCountAt(i));
+ lastItemInGroup = ((i == lastGroup) ? lastItem : (GetCore().GetItemCountAt(i) - 1));
for (; currentItem <= lastItemInGroup; currentItem++)
{
, __pEmptyText(null)
, __pAccessibilityElement(null)
, __redrawListView(true)
- , __isBoundsChanged(false)
+ , __isOrientationChanged(false)
, __needReloadItems(false)
, __pItemNeedsLazyDeletion(null)
, __pPropagatedTouchEventListener(null)
pProviderAdaptor->SetListViewItemEventListener(*this);
- r = pProviderAdaptor->SetListWidth(GetCore().GetBoundsF().width);
+ r = pProviderAdaptor->SetListWidth(GetBoundsF().width);
GetCore().SetItemProviderAdaptor(pProviderAdaptor);
}
else
{
pProviderAdaptor->SetItemProvider(provider);
- r = pProviderAdaptor->SetListWidth(GetCore().GetBoundsF().width);
+ r = pProviderAdaptor->SetListWidth(GetBoundsF().width);
UpdateList();
}
pProviderAdaptor->SetListViewItemEventListener(*this);
- r = pProviderAdaptor->SetListWidth(GetCore().GetBoundsF().width);
+ r = pProviderAdaptor->SetListWidth(GetBoundsF().width);
GetCore().SetItemProviderAdaptor(pProviderAdaptor);
}
else
{
pProviderAdaptor->SetItemProvider(provider);
- r = pProviderAdaptor->SetListWidth(GetCore().GetBoundsF().width);
+ r = pProviderAdaptor->SetListWidth(GetBoundsF().width);
UpdateList();
}
}
result
-_ListViewImpl::RefreshList(int index, ListRefreshType type, bool needFlush)
+_ListViewImpl::RefreshList(int index, ListRefreshType type)
{
result r = E_SUCCESS;
CheckEmptyListShowState();
- if (needFlush)
- {
- Draw();
- Show();
- }
+ Draw();
+ Show();
SetLastResultReturn(r);
}
pContainer->AddElement(*__pAccessibilityElement);
}
- Rectangle bounds = GetCore().GetBounds();
+ Rectangle bounds = GetBounds();
__pAccessibilityElement->SetBounds(Rectangle(0, 0, bounds.width, bounds.height));
String accessibilityLable;
{
_ControlImpl::OnChangeLayout(orientation);
- __isBoundsChanged = true;
+ __isOrientationChanged = true;
}
void
SetTextOfEmptyList(__pEmptyText->GetText());
}
- if (__isBoundsChanged)
+ if (__isOrientationChanged)
{
- int firstGroup = -1;
- int firstItem = -1;
- int lastGroup = -1;
- int lastItem = -1;
- int currentItem = -1;
- int lastItemInGroup = -1;
-
- GetCore().GetFirstLoadedItemIndex(firstGroup, firstItem);
- GetCore().GetLastLoadedItemIndex(lastGroup, lastItem);
-
- for (int i = firstGroup; i <= lastGroup; i++)
- {
- currentItem = ((i == firstGroup) ? firstItem : -1);
- lastItemInGroup = ((i == lastGroup) ? lastItem : GetCore().GetItemCountAt(i));
-
- for (; currentItem <= lastItemInGroup; currentItem++)
- {
- _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(i, currentItem));
-
- if (pListViewItem != null)
- {
- RefreshList(currentItem, LIST_REFRESH_TYPE_ITEM_MODIFY, false);
- }
- }
- }
-
- __isBoundsChanged = false;
+ __isOrientationChanged = false;
+ UpdateList();
}
}
int firstItem = -1;
int lastGroup = -1;
int lastItem = -1;
- int currentItem = -1;
- int lastItemInGroup = -1;
GetCore().GetFirstLoadedItemIndex(firstGroup, firstItem);
GetCore().GetLastLoadedItemIndex(lastGroup, lastItem);
- for (int i = firstGroup; i <= lastGroup; i++)
+ firstItem = ((firstItem == -1) ? 0 : firstItem);
+
+ for (int i = firstItem; i <= lastItem; i++)
{
- currentItem = ((i == firstGroup) ? firstItem : -1);
- lastItemInGroup = ((i == lastGroup) ? lastItem : GetCore().GetItemCountAt(i));
+ _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(0, i));
- for (; currentItem <= lastItemInGroup; currentItem++)
+ if (pListViewItem != null)
{
- _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(i, currentItem));
-
- if (pListViewItem != null)
- {
- pListViewItem->SetFont(fontName);
- }
+ pListViewItem->SetFont(fontName);
}
}
}
result HideItemDescriptionText(int groupIndex, int itemIndex);
- result RefreshList(int groupIndex, int itemIndex, ListRefreshType type, bool needFlush = true);
+ result RefreshList(int groupIndex, int itemIndex, ListRefreshType type);
result RefreshList(int groupIndex, int itemIndex, int elementId);
Tizen::Ui::_AccessibilityElement* __pAccessibilityElement;
bool __redrawListView;
- bool __isBoundsChanged;
+ bool __isOrientationChanged;
bool __needReloadItems;
_ListViewItem* __pItemNeedsLazyDeletion;
result HideItemDescriptionText(int index);
- result RefreshList(int index, ListRefreshType type, bool needFlush = true);
+ result RefreshList(int index, ListRefreshType type);
result RefreshList(int index, int elementId);
Tizen::Ui::_AccessibilityElement* __pAccessibilityElement;
bool __redrawListView;
- bool __isBoundsChanged;
+ bool __isOrientationChanged;
bool __needReloadItems;
_ListViewItem* __pItemNeedsLazyDeletion;