class AddressbookListPopup
: public Tizen::Ui::Controls::Popup
, public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
, public Tizen::Ui::Controls::IListViewItemEventListener
, public Tizen::Ui::Controls::IListViewItemProvider
{
virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase *pItem, int itemWidth);
virtual int GetItemCount(void);
+ virtual bool OnKeyPressed(Tizen::Ui::Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+ virtual bool OnKeyReleased(Tizen::Ui::Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+ virtual bool OnPreviewKeyPressed(Tizen::Ui::Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+ virtual bool OnPreviewKeyReleased(Tizen::Ui::Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+
result Construct(const Tizen::Ui::Controls::Form* pForm);
result GetAddressbookList(void);
__pListView->AddListViewItemEventListener(*this);
pPopupScrollPanel->AddControl(__pListView);
+ SetPropagatedKeyEventListener(this);
+
r = GetAddressbookList();
TryReturn(!IsFailed(r), r, "Failed to get addressbook list (%s)", GetErrorMessage(r));
{
}
+bool
+AddressbookListPopup::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ return true;
+}
+
+bool
+AddressbookListPopup::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ if (keyEventInfo.GetKeyCode() == KEY_ESC || keyEventInfo.GetKeyCode() == KEY_BACK)
+ {
+ __pForm->SendUserEvent(0, null);
+ }
+
+ return true;
+}
+
+bool
+AddressbookListPopup::OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ return true;
+}
+
+bool
+AddressbookListPopup::OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ return true;
+}
+
Tizen::Ui::Controls::ListItemBase*
AddressbookListPopup::CreateItem(int index, int itemWidth)
{