unsigned int __playerScreenState;
bool __isAnimationPerformed;
bool __isRunByAppControl;
+ int __prevRepeatStateRunByAppControl;
Tizen::Base::Runtime::Timer* __pAnimationFinishedTimer;
Tizen::Base::Runtime::Timer* __pContentPlayTimer;
#include <FUiAnimations.h>\r
\r
class NotificationTicker\r
- : public Tizen::Base::Runtime::ITimerEventListener\r
+ : public Tizen::Ui::Animations::IAnimationTransactionEventListener\r
, protected Tizen::Ui::Window\r
{\r
public:\r
\r
result Construct(void);\r
\r
- void SetBoundTicker(Tizen::Graphics::Point point = Tizen::Graphics::Point(0, 0), int width = 720);\r
+ void SetBoundTicker(Tizen::Graphics::Rectangle rect);\r
void ShowTicker(const Tizen::Base::String& text, int timeOut = 2000);\r
result DestoryTicker(void);\r
\r
protected:\r
- void PlayControlAnimator(bool isShow);\r
-\r
virtual result OnInitializing(void);\r
virtual result OnTerminating(void);\r
\r
- virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);\r
+ virtual result OnDraw(void);\r
+\r
+ virtual void OnAnimationTransactionStarted(int transactionId){}\r
+ virtual void OnAnimationTransactionStopped(int transactionId);\r
+ virtual void OnAnimationTransactionFinished(int transactionId);\r
+\r
+private:\r
+ void DrawBackground(Tizen::Graphics::Canvas& canvas);\r
+ Tizen::Graphics::Bitmap* GetCapturedBitmapN(void);\r
+ void PlayControlAnimator(bool isShow);\r
+ void ForceStopAnimation(void);\r
\r
private:\r
Tizen::Ui::Controls::Panel* __pNotificationTickerPanel;\r
Tizen::Ui::Controls::Label* __pTickerTextLabel;\r
- Tizen::Base::Runtime::Timer* __pTickerTimeOutTimer;\r
- Tizen::Ui::Animations::VisualElement* __pVisualElement;\r
+ Tizen::Graphics::Bitmap* __pBgBitmap;\r
\r
+ Tizen::Graphics::Rectangle __hideStateRectangle;\r
+ Tizen::Graphics::Rectangle __showStateRectangle;\r
+\r
+ int __showTransactionId;\r
+ int __HideTransactionId;\r
int __timeOut;\r
+\r
bool __isDestory;\r
};\r
\r
return INIT_VALUE;
}
- IList* pContentSearchResultList = CommonUtil::ContentSearchResultListN(*pContentFileName, STRING_SORT_ALBUM, STRING_SORT_TITLE);
+ IList* pContentSearchResultList = null;
+ if (__keyWord == null)
+ {
+ pContentSearchResultList = CommonUtil::ContentSearchResultListN(*pContentFileName, STRING_SORT_ALBUM, STRING_SORT_TITLE);
+ }
+ else
+ {
+ String WhereExpr = null;
+ WhereExpr = CommonUtil::SpecialReplaceChange(__keyWord);
+ WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ARTIST, WhereExpr);
+
+ String SearchKeyword(WhereExpr);
+ SearchKeyword.Append(L" AND ");
+
+ WhereExpr = CommonUtil::SpecialReplaceChange(*pContentFileName);
+ WhereExpr = CommonUtil::MakeQuery(STRING_SORT_ALBUM, WhereExpr);
+
+ SearchKeyword.Append(WhereExpr);
+ pContentSearchResultList = CommonUtil::SearchContentList(SearchKeyword, STRING_SORT_TITLE);
+ }
+
if (pContentSearchResultList == null)
{
AppLogDebug("CommonUtil::ContentSearchResultListN() failed");
}
int totalCount = pContentSearchResultList->GetCount();
-
pContentSearchResultList->RemoveAll(true);
delete pContentSearchResultList;
__pPlayerPresentationModel = PlayerPresentationModel::GetInstance();
int currentContentIndex = __pPlayerPresentationModel->GetCurrentContentIndex();
-
String* tempPath = __pPlayerPresentationModel->GetContentPath(currentContentIndex);
+ AppLogDebug("CATCH %ls", tempPath->GetPointer());
AudioContentInfo* pAudioInfo = CommonUtil::GetAudioContentInfoN(*(tempPath));
-// Label* pTitletName = static_cast<Label*>(GetControl(IDC_TITLE_LABEL));
-// pTitletName->SetTextConfig(56,LABEL_TEXT_STYLE_BOLD);
-// pTitletName->SetText(pAudioInfo->GetTitle());
-
- GetHeader()->SetTitleText(pAudioInfo->GetTitle());
-
- Label* pArtistName = static_cast<Label*>(GetControl(IDC_ARTIST_NAME_LABEL));
- pArtistName->SetTextConfig(37,LABEL_TEXT_STYLE_NORMAL);
- pArtistName->SetText(pAudioInfo->GetArtist());
-
- Label* pMediaInfo = static_cast<Label*>(GetControl(IDC_MEDIA_INFO_LABEL));
- pMediaInfo->SetTextConfig(52,LABEL_TEXT_STYLE_NORMAL);
- pMediaInfo->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MEDIA_INFO"));
-
- Label* pNameLabel = static_cast<Label*>(GetControl(IDC_NAME_LABEL));
- pNameLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_DETAILS_NAME"));
-
- Label* pFormatLabel = static_cast<Label*>(GetControl(IDC_FORMAT_LABEL));
- pFormatLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_FORMAT"));
-
- Label* pSizeLabel = static_cast<Label*>(GetControl(IDC_SIZE_LABEL));
- pSizeLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SIZE"));
-
- Label* pForwardingLabel = static_cast<Label*>(GetControl(IDC_FORWARDING_LABEL));
- pForwardingLabel->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_FORWARDING"));
-
- Label* pDateLabel = static_cast<Label*>(GetControl(IDC_DATE_LABEL));
- pDateLabel->SetText(ResourceManager::GetString(L"IDS_IV_BODY_DATE_CREATED"));
-
- Label* plocationLable= static_cast<Label*>(GetControl(IDC_LOCATION_LABEL));
- plocationLable->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MUSIC_LOCATION"));
-
- Label* pTitletNameInMediaInfo = static_cast<Label*>(GetControl(IDC_NAME_DATA_LABEL));
- pTitletNameInMediaInfo->SetText(pAudioInfo->GetTitle());
-
- Label* pFormatData = static_cast<Label*>(GetControl(IDC_FORMAT_DATA_LABEL));
- pFormatData->SetText(pAudioInfo->GetMediaFormat());
-
- unsigned long contentSize = 0;
- String stringContentSize = null;
- Label* pSize = static_cast<Label*>(GetControl(IDC_SIZE_DATA_LABEL));
- contentSize = pAudioInfo->GetContentSize();
-
- if (contentSize >= SCALE_MBYTE)
- {
- int megaByte = (contentSize / SCALE_MBYTE);
- int killoByte = ((((contentSize % SCALE_MBYTE) / SCALE_KBYTE ) * DECIMAL_ROUNDING) / SCALE_KBYTE);
-
- stringContentSize.Format(256, L"%d.%dMB", megaByte, killoByte);
- }
- else if (contentSize >= SCALE_KBYTE)
- {
- int killoByte = (contentSize / SCALE_KBYTE);
- int bytes = (((contentSize % SCALE_KBYTE) * DECIMAL_ROUNDING) / SCALE_KBYTE);
- stringContentSize.Format(256, L"%d.%dKB", killoByte, bytes);
- }
- else
- {
- stringContentSize.Format(256, L"%dB", contentSize);
- }
- pSize->SetText(stringContentSize);
-
- bool isDrmProtected = false;
- isDrmProtected = pAudioInfo->IsDrmProtected();
- Label* pForwarding = static_cast<Label*>(GetControl(IDC_FORWARDING_DATA_LABEL));
- if (isDrmProtected == true)
+ if (pAudioInfo != null)
{
- pForwarding->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_IMPOSSIBLE"));
+ GetHeader()->SetTitleText(pAudioInfo->GetTitle());
+
+ Label* pArtistName = static_cast<Label*>(GetControl(IDC_ARTIST_NAME_LABEL));
+ pArtistName->SetTextConfig(37,LABEL_TEXT_STYLE_NORMAL);
+ pArtistName->SetText(pAudioInfo->GetArtist());
+
+ Label* pMediaInfo = static_cast<Label*>(GetControl(IDC_MEDIA_INFO_LABEL));
+ pMediaInfo->SetTextConfig(52,LABEL_TEXT_STYLE_NORMAL);
+ pMediaInfo->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MEDIA_INFO"));
+
+ Label* pNameLabel = static_cast<Label*>(GetControl(IDC_NAME_LABEL));
+ pNameLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_DETAILS_NAME"));
+
+ Label* pFormatLabel = static_cast<Label*>(GetControl(IDC_FORMAT_LABEL));
+ pFormatLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_FORMAT"));
+
+ Label* pSizeLabel = static_cast<Label*>(GetControl(IDC_SIZE_LABEL));
+ pSizeLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SIZE"));
+
+ Label* pForwardingLabel = static_cast<Label*>(GetControl(IDC_FORWARDING_LABEL));
+ pForwardingLabel->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_FORWARDING"));
+
+ Label* pDateLabel = static_cast<Label*>(GetControl(IDC_DATE_LABEL));
+ pDateLabel->SetText(ResourceManager::GetString(L"IDS_IV_BODY_DATE_CREATED"));
+
+ Label* plocationLable= static_cast<Label*>(GetControl(IDC_LOCATION_LABEL));
+ plocationLable->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MUSIC_LOCATION"));
+
+ Label* pTitletNameInMediaInfo = static_cast<Label*>(GetControl(IDC_NAME_DATA_LABEL));
+ pTitletNameInMediaInfo->SetText(pAudioInfo->GetTitle());
+
+ Label* pFormatData = static_cast<Label*>(GetControl(IDC_FORMAT_DATA_LABEL));
+ pFormatData->SetText(pAudioInfo->GetMediaFormat());
+
+ unsigned long contentSize = 0;
+ String stringContentSize = null;
+ Label* pSize = static_cast<Label*>(GetControl(IDC_SIZE_DATA_LABEL));
+ contentSize = pAudioInfo->GetContentSize();
+
+ if (contentSize >= SCALE_MBYTE)
+ {
+ int megaByte = (contentSize / SCALE_MBYTE);
+ int killoByte = ((((contentSize % SCALE_MBYTE) / SCALE_KBYTE ) * DECIMAL_ROUNDING) / SCALE_KBYTE);
+
+ stringContentSize.Format(256, L"%d.%dMB", megaByte, killoByte);
+ }
+ else if (contentSize >= SCALE_KBYTE)
+ {
+ int killoByte = (contentSize / SCALE_KBYTE);
+ int bytes = (((contentSize % SCALE_KBYTE) * DECIMAL_ROUNDING) / SCALE_KBYTE);
+ stringContentSize.Format(256, L"%d.%dKB", killoByte, bytes);
+ }
+ else
+ {
+ stringContentSize.Format(256, L"%dB", contentSize);
+ }
+ pSize->SetText(stringContentSize);
+
+ bool isDrmProtected = false;
+ isDrmProtected = pAudioInfo->IsDrmProtected();
+ Label* pForwarding = static_cast<Label*>(GetControl(IDC_FORWARDING_DATA_LABEL));
+ if (isDrmProtected == true)
+ {
+ pForwarding->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_IMPOSSIBLE"));
+ }
+ else
+ {
+ pForwarding->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_POSSIBLE"));
+ }
+
+ String stringDate = null;
+ int day = 0;
+ int month = 0;
+ int year = 0;
+ int hour = 0;
+ int minute = 0;
+
+ day = pAudioInfo->GetDateTime().GetDay();
+ month = pAudioInfo->GetDateTime().GetMonth();
+ year = pAudioInfo->GetDateTime().GetYear();
+ hour = pAudioInfo->GetDateTime().GetHour();
+ minute = pAudioInfo->GetDateTime().GetMinute();
+ stringDate.Format(20, L"%04d.%02d.%02d %02d:%02d",
+ year,
+ month,
+ day,
+ hour,
+ minute);
+
+ Label* pDate = static_cast<Label*>(GetControl(IDC_DATE_DATA_LABEL));
+ pDate->SetText(stringDate);
+
+ String stringContentPath = null;
+ int indexOf = 0;
+ pAudioInfo->GetContentPath().LastIndexOf(L"/", (pAudioInfo->GetContentPath().GetLength() - 1), indexOf);
+ pAudioInfo->GetContentPath().SubString(0, indexOf, stringContentPath);
+
+ Label* pLocation = static_cast<Label*>(GetControl(IDC_LOCATION_DATA_LABEL));
+ pLocation->SetText(stringContentPath);
+ Invalidate(true);
}
else
{
- pForwarding->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_POSSIBLE"));
+ Tizen::Content::AudioMetadata* pAudioMeta = Tizen::Content::ContentManagerUtil::GetAudioMetaN(*tempPath);
+ if (pAudioMeta == null)
+ {
+ AppLogDebug("EXIT");
+ return E_FAILURE;
+ }
+
+ if (pAudioMeta->GetTitle() != null)
+ {
+ GetHeader()->SetTitleText(pAudioMeta->GetTitle());
+ }
+ else
+ {
+ GetHeader()->SetTitleText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+ }
+
+ Label* pArtistName = static_cast<Label*>(GetControl(IDC_ARTIST_NAME_LABEL));
+ pArtistName->SetTextConfig(37, LABEL_TEXT_STYLE_NORMAL);
+ if (pAudioMeta->GetArtist() != null)
+ {
+ pArtistName->SetText(pAudioMeta->GetArtist());
+ }
+ else
+ {
+ pArtistName->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+ }
+
+ Label* pMediaInfo = static_cast<Label*>(GetControl(IDC_MEDIA_INFO_LABEL));
+ pMediaInfo->SetTextConfig(52,LABEL_TEXT_STYLE_NORMAL);
+ pMediaInfo->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MEDIA_INFO"));
+
+ Label* pNameLabel = static_cast<Label*>(GetControl(IDC_NAME_LABEL));
+ pNameLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_DETAILS_NAME"));
+
+ Label* pFormatLabel = static_cast<Label*>(GetControl(IDC_FORMAT_LABEL));
+ pFormatLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_FORMAT"));
+
+ Label* pSizeLabel = static_cast<Label*>(GetControl(IDC_SIZE_LABEL));
+ pSizeLabel->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SIZE"));
+
+ Label* pForwardingLabel = static_cast<Label*>(GetControl(IDC_FORWARDING_LABEL));
+ pForwardingLabel->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_FORWARDING"));
+
+ Label* pDateLabel = static_cast<Label*>(GetControl(IDC_DATE_LABEL));
+ pDateLabel->SetText(ResourceManager::GetString(L"IDS_IV_BODY_DATE_CREATED"));
+
+ Label* plocationLable= static_cast<Label*>(GetControl(IDC_LOCATION_LABEL));
+ plocationLable->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_MUSIC_LOCATION"));
+
+ Label* pTitletNameInMediaInfo = static_cast<Label*>(GetControl(IDC_NAME_DATA_LABEL));
+ if (pAudioMeta->GetTitle() != null)
+ {
+ pTitletNameInMediaInfo->SetText(pAudioMeta->GetTitle());
+ }
+ else
+ {
+ pTitletNameInMediaInfo->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+ }
+
+ Label* pFormatData = static_cast<Label*>(GetControl(IDC_FORMAT_DATA_LABEL));
+ pFormatData->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+
+ Label* pSize = static_cast<Label*>(GetControl(IDC_SIZE_DATA_LABEL));
+ pSize->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+
+ Label* pForwarding = static_cast<Label*>(GetControl(IDC_FORWARDING_DATA_LABEL));
+ pForwarding->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+
+ Label* pDate = static_cast<Label*>(GetControl(IDC_DATE_DATA_LABEL));
+ if (pAudioMeta->GetRecordingDate() != null)
+ {
+ pDate->SetText(pAudioMeta->GetRecordingDate());
+ }
+ else
+ {
+ pDate->SetText(ResourceManager::GetString(L"IDS_MUSIC_BODY_UNKNOWN"));
+ }
+
+ String stringContentPath = null;
+ int indexOf = 0;
+ tempPath->LastIndexOf(L"/", (tempPath->GetLength() - 1), indexOf);
+ tempPath->SubString(0, indexOf, stringContentPath);
+ Label* pLocation = static_cast<Label*>(GetControl(IDC_LOCATION_DATA_LABEL));
+ pLocation->SetText(stringContentPath);
+ Invalidate(true);
}
-
- String stringDate = null;
- int day = 0;
- int month = 0;
- int year = 0;
- int hour = 0;
- int minute = 0;
-
- day = pAudioInfo->GetDateTime().GetDay();
- month = pAudioInfo->GetDateTime().GetMonth();
- year = pAudioInfo->GetDateTime().GetYear();
- hour = pAudioInfo->GetDateTime().GetHour();
- minute = pAudioInfo->GetDateTime().GetMinute();
- stringDate.Format(20, L"%04d.%02d.%02d %02d:%02d",
- year,
- month,
- day,
- hour,
- minute);
-
- Label* pDate = static_cast<Label*>(GetControl(IDC_DATE_DATA_LABEL));
- pDate->SetText(stringDate);
-
- String stringContentPath = null;
- int indexOf = 0;
- pAudioInfo->GetContentPath().LastIndexOf(L"/", (pAudioInfo->GetContentPath().GetLength() - 1), indexOf);
- pAudioInfo->GetContentPath().SubString(0, indexOf, stringContentPath);
-
- Label* pLocation = static_cast<Label*>(GetControl(IDC_LOCATION_DATA_LABEL));
- pLocation->SetText(stringContentPath);
- Invalidate(true);
-
AppLogDebug("EXIT");
return r;
}
}\r
}\r
\r
- __pNotificationTicker->SetBoundTicker(point, TickerWidth);\r
+// __pNotificationTicker->SetBoundTicker(point, TickerWidth);\r
__pNotificationTicker->ShowTicker(text);\r
AppLogDebug("EXIT");\r
return E_SUCCESS;\r
FolderContentListForm::CreateTableViewItem(Tizen::Ui::Controls::TableViewItem& parent, const ContentInformation& contentInfo)
{
AppLogDebug("ENTER");
- Panel* pTableViewItem = new (std::nothrow) Panel();
+ Panel* pTableViewItem = new (std::nothrow) Panel();
if (GetScreenState() != SCREEN_STATE_NORMAL)
{
if (IsFailed(pTableViewItem->Construct(IDL_CONTENT_LIST_FOLDER_EDITOR_ITEM_PANEL)))
tempPath.LastIndexOf(L"/", tempPath.GetLength() - 1, indexOf);
tempPath.SubString(indexOf + 1, fileName);
- if (filePath.Contains(IDS_STORAGE_PHONE_PATH))
+ if (IDS_STORAGE_PHONE_PATH.Contains(filePath))
{
StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_PHONE);
}
- else if (filePath.Contains(IDS_STORAGE_SDCARD_PATH))
+ else if (IDS_STORAGE_SDCARD_PATH.Contains(filePath))
{
StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_SDCARD);
}
contentPath.LastIndexOf(IDS_SEPARATOR_SLASH, contentPath.GetLength() - 1, folderNamePosition);
contentPath.SubString(folderNamePosition + 1, strFolderName);
- if (contentPath.Contains(IDS_STORAGE_PHONE_PATH))
+ if (IDS_STORAGE_PHONE_PATH.Contains(contentPath))
{
StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_PHONE);
}
- else if (contentPath.Contains(IDS_STORAGE_SDCARD_PATH))
+ else if (IDS_STORAGE_SDCARD_PATH.Contains(contentPath))
{
StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_SDCARD);
}
contentPath.LastIndexOf(IDS_SEPARATOR_SLASH, contentPath.GetLength() - 1, folderNamePosition);
contentPath.SubString(folderNamePosition + 1, strFolderName);
- if (contentPath.Contains(IDS_STORAGE_PHONE_PATH))
+ if (IDS_STORAGE_PHONE_PATH.Contains(contentPath))
{
StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_PHONE);
}
- else if (contentPath.Contains(IDS_STORAGE_SDCARD_PATH))
+ else if (IDS_STORAGE_SDCARD_PATH.Contains(contentPath))
{
StorageIconBitmap = ResourceManager::GetBitmapN(IDB_STORAGE_SDCARD);
}
{\r
__pMinPlayerPlayToggleButton->SetEnabled(false);\r
}\r
+ else if (__pMinPlayerPlayToggleButton->IsEnabled() == false)\r
+ {\r
+ __pMinPlayerPlayToggleButton->SetEnabled(true);\r
+ }\r
\r
switch (__pPresentationModel->GetPlayerState())\r
{\r
, __playerScreenState(PLAYER_SCREEN_STATE_NORMAL)
, __isAnimationPerformed(false)
, __isRunByAppControl(false)
+ , __prevRepeatStateRunByAppControl(0)
, __pAnimationFinishedTimer(null)
, __pContentPlayTimer(null)
, __pPreviousSceneId(null)
__pAlbumArtElements = null;
}
- __isRunByAppControl = false;
+ if (__isRunByAppControl == true)
+ {
+ __pPlayerPresentationModel->SetRepeatMode(__prevRepeatStateRunByAppControl);
+ __isRunByAppControl = false;
+ }
RemoveContextMenu();
RemoveSharePicker();
SetContextMenuItem(CONTEXT_MENU_ITEM_STYLE_SET_AS | CONTEXT_MENU_ITEM_STYLE_DETAILS | CONTEXT_MENU_ITEM_STYLE_SHARE_VIA
| CONTEXT_MENU_ITEM_STYLE_ADD_TO_PLAYLIST | CONTEXT_MENU_ITEM_STYLE_SETTINGS);
}
- else if (GetPlayerScreenState() == PLAYER_SCREEN_STATE_APP_CONTROL)
+ else if (GetPlayerScreenState() == PLAYER_SCREEN_STATE_APP_CONTROL || GetPlayerScreenState() == PLAYER_SCREEN_STATE_INVALID_CONTENT_ID)
{
CreateContextMenuN(source);
SetContextMenuItem(CONTEXT_MENU_ITEM_STYLE_SET_AS | CONTEXT_MENU_ITEM_STYLE_DETAILS | CONTEXT_MENU_ITEM_STYLE_SHARE_VIA);
SetShuffleButtonImage(__pPlayerPresentationModel->IsShuffleEnable());// 0 - 1 (OFF, ON)
TogglePlayPauseImage(__pPlayerPresentationModel->GetPlayerState());
+ __isRunByAppControl = false;
if (!static_cast<String*>(pArgs->GetAt(0))->Equals(MUSIC, false))
{
SetPlayerScreenState(PLAYER_SCREEN_STATE_APP_CONTROL);
playerState = PLAYER_STATE_ERROR;
}
- Bitmap* p = __pPlayerPresentationModel->GetPlayContentThumbnail();
- if (p == null)
- {
- AppLogDebug("null");
- }
-
SetContentInfo( __pPlayerPresentationModel->GetCurrentContentIndex());
OnPlayTimeChanged(__pPlayerPresentationModel->GetCurrentDuration(), __pPlayerPresentationModel->GetPlayPosition());
OnPlayStateChanged(playerState);
}
}
+ if (__pContentsListViewPanel->IsEnabled() == true && __isRunByAppControl == false)
+ {
+ TableView* pContentsTableView = static_cast<TableView*>(__pContentsListViewPanel->GetControl(IDC_CONTENTS_TABLEVIEW));
+ pContentsTableView->UpdateTableView();
+ }
+
Invalidate(true);
AppLogDebug("EXIT");
}
{
__pContentsViewToggleButton->SetEnabled(false);
__pShuffleButton->SetEnabled(false);
- __pMoreContextButton->SetEnabled(false);
+// __pMoreContextButton->SetEnabled(false);
}
if (__isRunByAppControl == false)
{
__pContentsViewToggleButton->SetEnabled(false);
__pShuffleButton->SetEnabled(false);
+ __pRepeatButton->SetEnabled(false);
+ __prevRepeatStateRunByAppControl = __pPlayerPresentationModel->GetRepeatState();
+ SetRepeatButtonImage(IDA_TYPE_REPEAT_A);
__isRunByAppControl = true;
}
__pContentsViewToggleButton->SetEnabled(false);
__pContentsViewToggleButton->Invalidate(true);
__pRepeatButton->SetEnabled(false);
- __pMoreContextButton->SetEnabled(false);
+// __pMoreContextButton->SetEnabled(false);
}
break;
CallOnPlayContentChanged(__currentContentIndex);
if (GetPlayerState() == PLAYER_STATE_PAUSED)
{
+ __lastPosition = 0;
__pPlayer->SeekTo(MIN_SLIDER_COUNT);
InitializeProgress();
}
* @brief This is the implementation file for NotificationTicker class.\r
*/\r
\r
+#include <FUiScenes.h>\r
#include "MpCommonUtil.h"\r
#include "MpNotificationTicker.h"\r
\r
using namespace Tizen::Ui;\r
using namespace Tizen::Ui::Animations;\r
using namespace Tizen::Ui::Controls;\r
+using namespace Tizen::Ui::Scenes;\r
\r
NotificationTicker::NotificationTicker(void)\r
: __pNotificationTickerPanel(null)\r
, __pTickerTextLabel(null)\r
- , __pTickerTimeOutTimer(null)\r
+ , __pBgBitmap(null)\r
+ , __hideStateRectangle()\r
+ , __showStateRectangle()\r
+ , __showTransactionId(-1)\r
+ , __HideTransactionId(-1)\r
, __timeOut(0)\r
, __isDestory(false)\r
{\r
NotificationTicker::~NotificationTicker(void)\r
{\r
AppLogDebug("ENTER");\r
- if (__pTickerTimeOutTimer != null)\r
- {\r
- __pTickerTimeOutTimer->Cancel();\r
- delete __pTickerTimeOutTimer;\r
- __pTickerTimeOutTimer = null;\r
- }\r
-\r
- if (__pNotificationTickerPanel != null)\r
+ if (__isDestory == false)\r
{\r
+ AnimationTransaction::SetTransactionEventListener(null);\r
RemoveControl(__pNotificationTickerPanel);\r
- __pNotificationTickerPanel = null;\r
\r
- __pTickerTextLabel = null;\r
+ if (__pBgBitmap != null)\r
+ {\r
+ delete __pBgBitmap;\r
+ }\r
}\r
AppLogDebug("EXIT");\r
}\r
TryCatch(r == E_SUCCESS, , "Construct failed(%s)", GetErrorMessage(r));\r
\r
__pTickerTextLabel = static_cast<Label*>(__pNotificationTickerPanel->GetControl(L"IDC_LABEL_NOTIFICATION_TEXT"));\r
- __pTickerTimeOutTimer = new (std::nothrow) Timer();\r
- r = __pTickerTimeOutTimer->Construct(*this);\r
- TryCatch(r == E_SUCCESS, , "Construct failed(%s)", GetErrorMessage(r));\r
\r
AddControl(__pNotificationTickerPanel);\r
- CommonUtil::SetLayoutFitToContainer(*this, *__pNotificationTickerPanel);\r
-\r
SetShowState(false);\r
\r
+ AnimationTransaction::SetTransactionEventListener(this);\r
AppLogDebug("EXIT");\r
return r;\r
\r
delete __pNotificationTickerPanel;\r
__pNotificationTickerPanel = null;\r
\r
- delete __pTickerTimeOutTimer;\r
- __pTickerTimeOutTimer = null;\r
-\r
AppLogDebug("EXIT(%s)", GetErrorMessage(r));\r
return r;\r
}\r
\r
void\r
-NotificationTicker::SetBoundTicker(Tizen::Graphics::Point point, int width)\r
+NotificationTicker::SetBoundTicker(Tizen::Graphics::Rectangle rect)\r
{\r
AppLogDebug("ENTER");\r
- SetPosition(point);\r
- SetSize(width, GetHeight());\r
+ Point point = rect.GetTopLeft();\r
+ Dimension dimension(rect.width, rect.height);\r
+\r
+ __showStateRectangle.SetBounds(point, dimension);\r
+ SetBounds(__showStateRectangle);\r
+\r
+ point.y = - dimension.height;\r
+ __hideStateRectangle.SetBounds(point, dimension);\r
AppLogDebug("EXIT");\r
}\r
\r
NotificationTicker::ShowTicker(const Tizen::Base::String& text, int timeOut)\r
{\r
AppLogDebug("ENTER");\r
+ ForceStopAnimation();\r
+\r
__pTickerTextLabel->SetText(text);\r
__timeOut = timeOut;\r
- if (GetShowState() == false)\r
+\r
+ SetShowState(true);\r
+ Show();\r
+ AppLogDebug("EXIT");\r
+}\r
+\r
+void\r
+NotificationTicker::ForceStopAnimation(void)\r
+{\r
+ AppLogDebug("ENTER");\r
+ AnimationTransaction::Discard();\r
+ if (GetShowState() == true)\r
{\r
-// SetShowState(true);\r
- PlayControlAnimator(true);\r
+ SetShowState(false);\r
}\r
- Show();\r
AppLogDebug("EXIT");\r
}\r
\r
NotificationTicker::PlayControlAnimator(bool isShow)\r
{\r
AppLogDebug("ENTER");\r
- AnimationTransaction::Begin();\r
- GetControlAnimator()->SetShowState(isShow);\r
+ if (isShow == true)\r
+ {\r
+ AnimationTransaction::Begin(__showTransactionId);\r
+ RectangleAnimation tickerAnimation(__hideStateRectangle, __showStateRectangle, 1000, ANIMATION_INTERPOLATOR_LINEAR);\r
+ __pNotificationTickerPanel->GetControlAnimator()->StartUserAnimation(ANIMATION_TARGET_POSITION, tickerAnimation);\r
+ }\r
+ else\r
+ {\r
+ AnimationTransaction::Begin(__HideTransactionId);\r
+ RectangleAnimation tickerAnimation(__showStateRectangle, __hideStateRectangle, 1000, ANIMATION_INTERPOLATOR_LINEAR);\r
+ tickerAnimation.SetDelay(__timeOut);\r
+ __pNotificationTickerPanel->GetControlAnimator()->StartUserAnimation(ANIMATION_TARGET_POSITION, tickerAnimation);\r
+ }\r
AnimationTransaction::Commit();\r
AppLogDebug("EXIT");\r
}\r
NotificationTicker::OnInitializing(void)\r
{\r
AppLogDebug("ENTER");\r
- if (__pTickerTimeOutTimer != null)\r
- {\r
- __pTickerTimeOutTimer->Cancel();\r
- __pTickerTimeOutTimer->Start(__timeOut);\r
- }\r
+ PlayControlAnimator(true);\r
AppLogDebug("EXIT");\r
return E_SUCCESS;\r
}\r
NotificationTicker::OnTerminating(void)\r
{\r
AppLogDebug("ENTER");\r
- __timeOut = 0;\r
- if (__pTickerTimeOutTimer != null)\r
- {\r
- __pTickerTimeOutTimer->Cancel();\r
- }\r
-\r
if (__isDestory == true)\r
{\r
+ AnimationTransaction::SetTransactionEventListener(null);\r
RemoveControl(__pNotificationTickerPanel);\r
-\r
__pNotificationTickerPanel = null;\r
- __pTickerTextLabel = null;\r
\r
- delete __pTickerTimeOutTimer;\r
- __pTickerTimeOutTimer = null;\r
+ if (__pBgBitmap != null)\r
+ {\r
+ delete __pBgBitmap;\r
+ __pBgBitmap = null;\r
+ }\r
}\r
-\r
AppLogDebug("EXIT");\r
return E_SUCCESS;\r
}\r
\r
void\r
-NotificationTicker::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)\r
+NotificationTicker::OnAnimationTransactionStopped(int transactionId)\r
+{\r
+ AppLogDebug("ENTER");\r
+ AppLogDebug("EXIT");\r
+}\r
+\r
+void\r
+NotificationTicker::OnAnimationTransactionFinished(int transactionId)\r
{\r
AppLogDebug("ENTER");\r
-// SetShowState(false);\r
- PlayControlAnimator(false);\r
+ if (transactionId == __showTransactionId)\r
+ {\r
+ PlayControlAnimator(false);\r
+ __showTransactionId = -1;\r
+ }\r
+ else if (transactionId == __HideTransactionId)\r
+ {\r
+ SetShowState(false);\r
+ __HideTransactionId = -1;\r
+ }\r
AppLogDebug("EXIT");\r
+}\r
+\r
+result\r
+NotificationTicker::OnDraw(void)\r
+{\r
+ AppLogDebug("ENTER");\r
+ Canvas* pCanvas = GetCanvasN();\r
+ if (pCanvas != null)\r
+ {\r
+ DrawBackground(*pCanvas);\r
+ delete pCanvas;\r
+ }\r
+\r
+ AppLogDebug("EXIT");\r
+ return Window::OnDraw();\r
+}\r
+\r
+void\r
+NotificationTicker::DrawBackground(Tizen::Graphics::Canvas& canvas)\r
+{\r
+ AppLogDebug("ENTER");\r
+ if (__pBgBitmap != null)\r
+ {\r
+ delete __pBgBitmap;\r
+ }\r
+\r
+ __pBgBitmap = GetCapturedBitmapN();\r
+ if (__pBgBitmap != null)\r
+ {\r
+ canvas.Clear();\r
+ canvas.DrawBitmap(GetBounds(), *__pBgBitmap, GetBounds());\r
+ delete __pBgBitmap;\r
+ __pBgBitmap = null;\r
+ }\r
+ AppLogDebug("EXIT");\r
+}\r
+\r
+Tizen::Graphics::Bitmap*\r
+NotificationTicker::GetCapturedBitmapN(void)\r
+{\r
+ AppLogDebug("ENTER");\r
+ SceneManager* pSceneManager = SceneManager::GetInstance();\r
+ AppAssert(pSceneManager);\r
+\r
+ Scene* pScene = pSceneManager->GetCurrentScene();\r
+ AppAssert(pScene);\r
+\r
+ Form* pForm = pScene->GetForm();\r
+ if (pForm == null)\r
+ {\r
+ AppLogDebug("EXIT");\r
+ return null;\r
+ }\r
+ AppLogDebug("EXIT");\r
+ return pForm->GetCapturedBitmapN();\r
}
\ No newline at end of file