static const int H_FOLDER_SIZE = 348;
AlbumListForm::AlbumListForm(void)
- : __itemCount(0)
+ : __isHWBackButtonExist(false)
+ , __itemCount(0)
, __pAlbumViewIconList(null)
, __pContextMenuMore(null)
+ , __pOptionMenu(null)
, __pPresentationModel(null)
+
{
AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
{
AppLogDebug("ENTER");
result r = E_SUCCESS;
+ GalleryApp* pApp = static_cast<GalleryApp*>(GalleryApp::GetInstance());
+
+ __isHWBackButtonExist = false;
+ __isHWBackButtonExist = pApp->IsHwKeySupported();
+ AppLogDebug("EXIT(%s)", GetErrorMessage(r));
+
__pPresentationModel = AlbumListPresentationModel::GetInstance();
__pPresentationModel->ClearThumbnailRequests();
pFooter->AddItem(itemCamera);
delete pBitmap1;
- ButtonItem footerMore;
- footerMore.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FOOTER_MORE);
- Bitmap* pBitmapMore = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE);
- Bitmap* pBitmapMoreDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_DISABLED);
- Bitmap* pBitmapMorePressed = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_PRESSED);
-
- if (pBitmapMore != null && pBitmapMoreDim != null && pBitmapMorePressed != null)
+ if( __isHWBackButtonExist == false )
{
- footerMore.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapMore);
- footerMore.SetIcon(BUTTON_ITEM_STATUS_DISABLED, pBitmapMoreDim);
- footerMore.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pBitmapMorePressed);
- }
+ ButtonItem footerMore;
+ footerMore.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FOOTER_MORE);
- pFooter->SetButton(BUTTON_POSITION_LEFT, footerMore);
- delete pBitmapMore;
- delete pBitmapMoreDim;
- delete pBitmapMorePressed;
+ Bitmap* pBitmapMore = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE);
+ Bitmap* pBitmapMoreDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_DISABLED);
+ Bitmap* pBitmapMorePressed = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE_PRESSED);
- __pContextMenuMore = new (std::nothrow) ContextMenu();
- __pContextMenuMore->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
- __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"), IDA_FOOTER_EDIT);
- __pContextMenuMore->SetShowState(false);
- __pContextMenuMore->AddActionEventListener(*this);
+ if (pBitmapMore != null && pBitmapMoreDim != null && pBitmapMorePressed != null)
+ {
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapMore);
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_DISABLED, pBitmapMoreDim);
+ footerMore.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pBitmapMorePressed);
+ }
+
+ pFooter->SetButton(BUTTON_POSITION_LEFT, footerMore);
+ delete pBitmapMore;
+ delete pBitmapMoreDim;
+ delete pBitmapMorePressed;
+
+ __pContextMenuMore = new (std::nothrow) ContextMenu();
+ __pContextMenuMore->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST);
+ __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"), IDA_FOOTER_EDIT);
+ __pContextMenuMore->SetShowState(false);
+ __pContextMenuMore->AddActionEventListener(*this);
+ }
+ else
+ {
+ __pOptionMenu = new (std::nothrow) OptionMenu();
+ __pOptionMenu->Construct();
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"),IDA_FOOTER_EDIT);
+ __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"), IDA_FOOTER_EDIT);
+ __pOptionMenu->SetShowState(false);
+ __pOptionMenu->AddActionEventListener(*this);
+ SetFormMenuEventListener(this);
+ }
SetFormBackEventListener(this);
}
{
AppLogDebug("ENTER");
+ if(__pContextMenuMore != null && __pContextMenuMore ->GetShowState() == true)
+ {
+ __pContextMenuMore->SetShowState(false);
+ }
+
+ if ( __pOptionMenu != null && __pOptionMenu ->GetShowState() == true)
+ {
+ __pOptionMenu->SetShowState(false);
+ __pOptionMenu->Show();
+ }
+
if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
{
if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE)
__itemCount = __pPresentationModel->GetFolderCount();
__pAlbumViewIconList->UpdateList();
+
if (__itemCount == 0 )
{
GetFooter()->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
{
GetFooter()->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
}
+
+ GetFooter()->Invalidate(true);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
return r;
}
+
+void
+AlbumListForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source)
+{
+
+ if ( __pOptionMenu == null )
+ {
+ return ;
+ }
+
+ __pOptionMenu->SetShowState(true);
+ __pOptionMenu->Show();
+
+}