virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
private:
Tizen::Base::String GetTitleText(void);
void RemovePackageInfoList(void);
Tizen::Base::String GetScreenType(void);
Tizen::Base::String GetItemString(int itemIndex);
+ void UpdateTableViewAndNoContent(void);
private:
int __wallpaperIndex;
{
if (GetTrustedRootCertificateStoreCount() == 0)
{
- CreateNoContents();
+ Label* pLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS, false));
+ if (pLabel != null)
+ {
+ Rectangle clientRect = GetClientAreaBounds();
+ Rectangle labelBound = pLabel->GetBounds();
+
+ int xPos = (clientRect.width / LINE_COUNT_2) - (labelBound.width / LINE_COUNT_2);
+ int yPos = (clientRect.height / LINE_COUNT_2) -(labelBound.height / LINE_COUNT_2);
+
+ pLabel->SetBounds(Rectangle(xPos, yPos, labelBound.width, labelBound.height));
+ yPos = yPos + pLabel->GetBounds().height;
+ Label* pTextLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS_TEXT, false));
+ if (pTextLabel != null)
+ {
+ pTextLabel->SetBounds(Rectangle(0, yPos, clientRect.width, pTextLabel->GetBounds().height));
+ }
+ }
}
return;
}
{
if (previousSceneId == IDSCN_FONT)
{
+ __pTableView->RefreshAllItems();
return;
}
__pTableView->UpdateTableView();
switch (groupIndex)
{
+ case ID_GROUP_FONT:
+ //fall through
+ case ID_GROUP_AUTO_ROTATE_SCREEN:
+ //fall through
+ case ID_GROUP_BACKLIGHT_TIME_LIST:
+ {
+ int fontSize = GetFontSize();
+ Label* pLabel = static_cast<Label*>(pItem->GetControl(0));
+
+ pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
+ pLabel->Invalidate(false);
+ }
+ break;
+
case ID_GROUP_BACKLIGHT_TIME:
{
Bitmap* pBitmap = null;
+ Label* pLabel = static_cast<Label*>(pItem->GetControl(0));
Label* pLabelBitmap = static_cast<Label*>(pItem->GetControl(1));
pSubLabel = static_cast<Label*>(pItem->GetControl(2));
+ int fontSize = GetFontSize();
+ Rectangle mainRectangle;
+ Rectangle subRectangle;
+ Rectangle pItemRectangle;
+ Rectangle detailArrow;
+
+ pItemRectangle = pItem->GetBounds();
+ ItemTypeTwoLine(mainRectangle, subRectangle, fontSize);
+
+ pLabel->SetBounds(mainRectangle);
+ pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
+
+ pItemRectangle.height = (mainRectangle.height + subRectangle.height);
+ pItem->SetBounds(pItemRectangle);
+
if (__pTableView->IsGroupExpanded(ID_GROUP_BACKLIGHT_TIME_LIST))
{
pBitmap = ResourceManager::GetBitmapN(IDB_DETAIL_BUTTON_EXPAND_OPENED);
pBitmap = ResourceManager::GetBitmapN(IDB_DETAIL_BUTTON_EXPAND_CLOSED);
}
pLabelBitmap->SetBackgroundBitmap(*pBitmap);
- pLabelBitmap->Invalidate(false);
+
+ detailArrow = mainRectangle;
+ detailArrow.y = mainRectangle.y + ((pItemRectangle.height - W_DETAIL_ARROW_BUTTON) / DEVIDE_TWO);
+ detailArrow.height = W_DETAIL_ARROW_BUTTON;
+ detailArrow.width = W_DETAIL_ARROW_BUTTON;
+ pLabelBitmap->SetBounds(detailArrow);
index = GetBackLightTimeIndex();
subItemText = GetBackLightTimeIndexString(index);
-
+ pSubLabel->SetBounds(subRectangle);
pSubLabel->SetText(subItemText);
+ pSubLabel->SetTextConfig(FONT_SIZE_SUB_TEXT, LABEL_TEXT_STYLE_NORMAL);
+
+ pLabel->Invalidate(false);
+ pLabelBitmap->Invalidate(false);
pSubLabel->Invalidate(false);
+ pItem->Invalidate(false);
}
break;
-
- default:
- break;
}
Invalidate(true);
void
DownloadedApplicationForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
{
- UpdateTableViewAndNoContent();
+ Label* pLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS, false));
+ if (pLabel != null)
+ {
+ Rectangle clientRect = GetClientAreaBounds();
+ Rectangle labelBound = pLabel->GetBounds();
+
+ int xPos = (clientRect.width / LINE_COUNT_2) - (labelBound.width / LINE_COUNT_2);
+ int yPos = (clientRect.height / LINE_COUNT_2) -(labelBound.height / LINE_COUNT_2);
+
+ pLabel->SetBounds(Rectangle(xPos, yPos, labelBound.width, labelBound.height));
+ yPos = yPos + pLabel->GetBounds().height;
+ Label* pTextLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS_TEXT, false));
+ if (pTextLabel != null)
+ {
+ pTextLabel->SetBounds(Rectangle(0, yPos, clientRect.width, pTextLabel->GetBounds().height));
+ }
+ }
Invalidate(true);
}
MainMenuForm::MainMenuForm(void)
: __currentTableViewList(0)
- , __pFlightModeSetValueAsyncResultListener(null)
, __isRunningAppControl(false)
+ , __pFlightModeSetValueAsyncResultListener(null)
{
}
void
PrivacyForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
{
- UpdateTableViewAndNoContent();
+ Label* pLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS, false));
+ if (pLabel != null)
+ {
+ Rectangle clientRect = GetClientAreaBounds();
+ Rectangle labelBound = pLabel->GetBounds();
+
+ int xPos = (clientRect.width / LINE_COUNT_2) - (labelBound.width / LINE_COUNT_2);
+ int yPos = (clientRect.height / LINE_COUNT_2) -(labelBound.height / LINE_COUNT_2);
+
+ pLabel->SetBounds(Rectangle(xPos, yPos, labelBound.width, labelBound.height));
+ yPos = yPos + pLabel->GetBounds().height;
+ Label* pTextLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS_TEXT, false));
+ if (pTextLabel != null)
+ {
+ pTextLabel->SetBounds(Rectangle(0, yPos, clientRect.width, pTextLabel->GetBounds().height));
+ }
+ }
Invalidate(true);
}
\ No newline at end of file
searchData.ToLower(toLowerSearchData);
inputsearchText.ToLower(toLowerInputSearchText);
- if ((toLowerSearchData).Contains(toLowerInputSearchText))
+ StringTokenizer strTok(toLowerSearchData, L":");
+ String token;
+ strTok.GetNextToken(token);
+
+ if ((token).Contains(toLowerInputSearchText))
{
if (searchData != null)
{
CreateHeader(GetTitleText());
CreateFooter();
- CreateTableView();
+ UpdateTableViewAndNoContent();
AppLogDebug("ENTER");
- __pTableView->UpdateTableView();
- __pTableView->SetItemChecked(0, 0, true);
+ if (__pPackageAppInfoList != null)
+ {
+ String applicationId;
+ String screenType;
+ if (GetWallpaperIndex() == 0)
+ {
+ screenType = SETTING_INFO_KEY_SCREEN_TYPE_HOME;
+ }
+ else
+ {
+ screenType = SETTING_INFO_KEY_SCREEN_TYPE_LOCK;
+ }
+ result r = SettingInfo::GetValue(screenType, applicationId);
+ AppLogDebug("GetValue(%ls, ..) result=[%s]", applicationId.GetPointer(), GetErrorMessage(r));
+
+ for (int index = 0; index < __pPackageAppInfoList->GetCount(); index++)
+ {
+ PackageAppInfo* pPackageAppInfo = dynamic_cast<PackageAppInfo*>(__pPackageAppInfoList->GetAt(index));
+ if (pPackageAppInfo)
+ {
+ if (applicationId.CompareTo(pPackageAppInfo->GetAppId()) == 0)
+ {
+ AppLogDebug("index [%d]", index);
+ if (__pTableView != null)
+ {
+ __pTableView->SetItemChecked(0, index, true);
+ }
+ break;
+ }
+ }
+ }
+ }
}
else
{
}
return returnValue;
+}
+
+void
+ScreenTypeForm::UpdateTableViewAndNoContent(void)
+{
+ bool createTableView = false;
+ if (__pTableView != null)
+ {
+ if (GetPackageAppInfoListCount() != 0)
+ {
+ __pTableView->UpdateTableView();
+ return;
+ }
+ }
+ else
+ {
+ if (GetPackageAppInfoListCount() != 0)
+ {
+ createTableView = true;
+ }
+ }
+
+ if (__pTableView != null)
+ {
+ int tableViewControlCount = __pTableView->GetControlCount();
+ for (int i = 0; i < tableViewControlCount; i++)
+ {
+ __pTableView->RemoveControl(__pTableView->GetControl(0));
+ }
+// __pTableView->RemoveAllControls();
+ __pTableView = null;
+ }
+ int controlCount = GetControlCount();
+ for (int i = 0; i < controlCount; i++)
+ {
+ RemoveControl(GetControl(0));
+ }
+// RemoveAllControls();
+
+ if (createTableView)
+ {
+ CreateTableView();
+ __pTableView->UpdateTableView();
+ }
+ else
+ {
+ Label* pLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS, false));
+ if (pLabel == null)
+ {
+ Rectangle clientRect = GetClientAreaBounds();
+ Bitmap* pBitmp = ResourceManager::GetBitmapN(IDB_NO_CONTENTS);
+
+ int bitmapWidth = pBitmp->GetWidth();
+ int bitmapHeight = pBitmp->GetHeight();
+ String labelText = ResourceManager::GetString(L"IDS_ST_BODY_NO_CONTENT");
+ Color textColor = COLOR_HELP_TEXT_TYPE_03_NORMAL;
+ int noContentTextHeight = GetHeightForStringArea(labelText, bitmapWidth, 32);
+
+ int xPos = (clientRect.width / LINE_COUNT_2) - (bitmapWidth / DEVIDE_TWO);
+ int yPos = (clientRect.height / LINE_COUNT_2) - ((bitmapHeight + noContentTextHeight) / DEVIDE_TWO);
+
+ Label* pLabel = new (std::nothrow) Label();
+ pLabel->Construct(Rectangle(xPos, yPos, bitmapWidth, bitmapHeight), L"");
+ pLabel->SetName(NO_CONTENTS);
+ pLabel->SetBackgroundBitmap(*pBitmp);
+
+ yPos = yPos + bitmapHeight;
+
+ Label* pLabelNoContents = new (std::nothrow) Label();
+ pLabelNoContents->Construct(Rectangle(0, yPos, clientRect.width, noContentTextHeight), L"");
+ pLabelNoContents->SetName(NO_CONTENTS_TEXT);
+ pLabelNoContents->SetTextColor(textColor);
+ pLabelNoContents->SetText(labelText);
+
+ AddControl(*pLabel);
+ AddControl(*pLabelNoContents);
+ }
+ }
+}
+
+void
+ScreenTypeForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+ Label* pLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS, false));
+ if (pLabel != null)
+ {
+ Rectangle clientRect = GetClientAreaBounds();
+ Rectangle labelBound = pLabel->GetBounds();
+
+ int xPos = (clientRect.width / LINE_COUNT_2) - (labelBound.width / LINE_COUNT_2);
+ int yPos = (clientRect.height / LINE_COUNT_2) -(labelBound.height / LINE_COUNT_2);
+
+ pLabel->SetBounds(Rectangle(xPos, yPos, labelBound.width, labelBound.height));
+ yPos = yPos + pLabel->GetBounds().height;
+ Label* pTextLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS_TEXT, false));
+ if (pTextLabel != null)
+ {
+ pTextLabel->SetBounds(Rectangle(0, yPos, clientRect.width, pTextLabel->GetBounds().height));
+ }
+ }
+ Invalidate(true);
}
\ No newline at end of file
{
if (__pIconListView == null)
{
- UpdateIconListView();
+ Label* pLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS, false));
+ if (pLabel != null)
+ {
+ Rectangle clientRect = GetClientAreaBounds();
+ Rectangle labelBound = pLabel->GetBounds();
+
+ int xPos = (clientRect.width / LINE_COUNT_2) - (labelBound.width / LINE_COUNT_2);
+ int yPos = (clientRect.height / LINE_COUNT_2) -(labelBound.height / LINE_COUNT_2);
+
+ pLabel->SetBounds(Rectangle(xPos, yPos, labelBound.width, labelBound.height));
+ yPos = yPos + pLabel->GetBounds().height;
+ Label* pTextLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS_TEXT, false));
+ if (pTextLabel != null)
+ {
+ pTextLabel->SetBounds(Rectangle(0, yPos, clientRect.width, pTextLabel->GetBounds().height));
+ }
+ }
}
else
{
delete __pAlbumPathList;
__pAlbumPathList = null;
IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList();
+ if (pAlbumInfoList == null)
+ {
+ AppLogDebug("pAlbumInfoList is null");
+ return;
+ }
+
AlbumInfo* pAlbumInfo = static_cast<AlbumInfo*>(pAlbumInfoList->GetAt(0));
+ if (pAlbumInfo == null)
+ {
+ AppLogDebug("pAlbumInfo is null");
+ return;
+ }
+
ArrayList* pAlbumPathList = new (std::nothrow) ArrayList(SingleObjectDeleter);
pAlbumPathList->Construct();
pAlbumPathList->Add(*(new (std::nothrow) String(allAlbumsString)));
}
else
{
- UpdateIconListView();
+ Label* pLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS, false));
+ if (pLabel != null)
+ {
+ Rectangle clientRect = GetClientAreaBounds();
+ Rectangle labelBound = pLabel->GetBounds();
+
+ int xPos = (clientRect.width / LINE_COUNT_2) - (labelBound.width / LINE_COUNT_2);
+ int yPos = (clientRect.height / LINE_COUNT_2) -(labelBound.height / LINE_COUNT_2);
+
+ pLabel->SetBounds(Rectangle(xPos, yPos, labelBound.width, labelBound.height));
+ yPos = yPos + pLabel->GetBounds().height;
+ Label* pTextLabel = static_cast<Label*>(this->GetControl(NO_CONTENTS_TEXT, false));
+ if (pTextLabel != null)
+ {
+ pTextLabel->SetBounds(Rectangle(0, yPos, clientRect.width, pTextLabel->GetBounds().height));
+ }
+ }
}
Invalidate(true);
}
int
WallpaperAlbumListPresentationModel::GetFolderCount(void)
{
+ if (__pAlbumInfoList == null)
+ {
+ return 0;
+ }
return __pAlbumInfoList->GetCount();
}
int
WallpaperAlbumListPresentationModel::GetFileCount(void)
{
+ if (__pCurrentFolderContentsIdList == null)
+ {
+ return 0;
+ }
return __pCurrentFolderContentsIdList->GetCount();
}
__pCurrentFolderContentsIdList = null;
}
+ if (pAlbumPathList == null)
+ {
+ return;
+ }
+
__pCurrentFolderContentsIdList = new (std::nothrow) ArrayList(SingleObjectDeleter);
int albumInfoDirectoryIndex = 0;
while (albumInfoDirectoryIndex < pAlbumPathList->GetCount())