, __multiSelection(false)
, __SelectedIndex(-1)
, __prevIndex(-1)
- , __panelHeight(0)
, __orientation(_CONTROL_ORIENTATION_PORTRAIT)
, __pWebView(null)
, __pToggledArray(null)
Panel* pButtonPanel = CreateAndAddPanel();
SysTryReturn(NID_WEB_CTRL, pButtonPanel, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
- __panelHeight = pButtonPanel->GetHeight();
-
_SystemResource* pSysResource = _SystemResource::GetInstance();
SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
- ArrayList idList(SingleObjectDeleter);
+ ArrayList idList;
r = idList.Construct();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
idList.Add(*(new Integer(ID_BUTTON_SELECTION)));
- ArrayList titleList(SingleObjectDeleter);
+ ArrayList titleList;
r = titleList.Construct();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = CreateAndAddButtons(idList, titleList, pButtonPanel);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
- SetSize(GetSize().width,GetSize().height + __panelHeight);
}
SetPropagatedKeyEventListener(this);
}
}
- int listItemHeight = 0;
- GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ITEM_HEIGHT, __orientation, listItemHeight);
- int prevCount = (__pListView->GetSize()).height / listItemHeight;
- int defaultCount = __multiSelection ? DEFAULT_LIST_ITEM_COUNT -1 : DEFAULT_LIST_ITEM_COUNT;
-
- if ((prevCount != itemCount)
- && ((prevCount < defaultCount && itemCount < defaultCount)
- || (prevCount < defaultCount && itemCount >= defaultCount)
- || (prevCount >= defaultCount && itemCount < defaultCount)))
- {
- int listViewNewHeight = ((itemCount < defaultCount) ? itemCount : defaultCount) * listItemHeight;
- int popupHeight = __multiSelection ? (listViewNewHeight + __panelHeight) : listViewNewHeight;
-
- __pListView->SetSize((__pListView->GetSize()).width, listViewNewHeight);
- SetSize(GetSize().width, popupHeight);
- }
-
__pListView->UpdateList();
return E_SUCCESS;